Skip to content

Commit 331175e

Browse files
committed
feat: update articles
1 parent 007bd42 commit 331175e

1 file changed

Lines changed: 0 additions & 61 deletions

File tree

‎Python/导论/快速开始.md‎

Lines changed: 0 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -53,67 +53,6 @@ verify_ssl = true
5353
name = "pypi"
5454
```
5555

56-
# Conda
57-
58-
笔者推荐使用 Anaconda 作为环境搭建工具,并且推荐使用 Python 3.5 版本,可以在[这里](https://www.continuum.io/downloads)下载。如果是习惯使用 Docker 的小伙伴可以参考[anaconda-notebook](https://github.com/rothnic/anaconda-notebook)
59-
60-
```docker pull rothnic/anaconda-notebook
61-
docker run -p 8888:8888 -i -t rothnic/anaconda-notebook
62-
```
63-
64-
安装完毕之后可以使用如下命令验证安装是否完毕:
65-
66-
```
67-
conda --version
68-
```
69-
70-
安装完毕之后我们就可以创建具体的开发环境了,主要是通过 create 命令来创建新的独立环境:
71-
72-
```
73-
conda create --name snowflakes biopython
74-
```
75-
76-
该命令会创建一个名为 snowflakes 并且安装了 Biopython 的环境,如果你需要切换到该开发环境,可以使用 activate 命令:
77-
- Linux, OS X: `source activate snowflakes`
78-
- Windows:  `activate snowflakes`
79-
80-
我们也可以在创建环境的时候指明是用 python2 还是 python3:
81-
82-
```
83-
conda create --name bunnies python=3 astroid babel
84-
```
85-
86-
环境创建完毕之后,我们可以使用`info`命令查看所有环境:
87-
88-
```
89-
conda info --envs
90-
91-
conda environments:
92-
93-
     snowflakes          * /home/username/miniconda/envs/snowflakes
94-
     bunnies               /home/username/miniconda/envs/bunnies
95-
     root                  /home/username/miniconda
96-
```
97-
98-
当我们切换到某个具体的环境后,可以安装依赖包了:
99-
100-
```
101-
conda list # 列举当前环境中的所有依赖包
102-
conda install nltk # 安装某个新的依赖
103-
```
104-
105-
## Jupyter Notebook
106-
107-
![](http://jupyter.org/assets/jupyterpreview.png)
108-
109-
在 Conda 安装之后,Jupyter Notebook 是默认安装好的,直接在工作目录下打开即可:
110-
111-
```sh
112-
$ jupyter notebook
113-
```
114-
115-
你可以参阅[Running the Notebook](http://jupyter.readthedocs.io/en/latest/running.html#running)获取更多命令细节。
116-
11756
# Hello Word
11857

11958
```py

0 commit comments

Comments
 (0)