anaconda安装与使用
2019-07-23 22:15 风中的一棵小草 阅读(470) 评论(0) 收藏 举报1.到清华镜像站下载软件https://mirrors.tuna.tsinghua.edu.cn/
2.安装,
3.添加环境变量:
1)anaconda prompt:path
2)将path显示的路径粘贴到环境变量——系统变量中
3)验证:win+r,cmd输入conda/python
4.换源:
- windows下
添加清华源
命令行中直接使用以下命令
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/
# 设置搜索时显示通道地址
conda config --set show_channel_urls yes
添加中科大源
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/pkgs/main/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/conda-forge/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/msys2/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/bioconda/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/menpo/
conda config --set show_channel_urls yes
- Linux下
将以上配置文件写在~/.condarc中
vim ~/.condarc
1
channels:
- https://mirrors.ustc.edu.cn/anaconda/pkgs/main/
- https://mirrors.ustc.edu.cn/anaconda/cloud/conda-forge/
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
- defaults
show_channel_urls: true
创建环境:
# 创建一个名为python27的环境,指定Python版本是2.7(不用管是2.7.x,conda会为我们自动寻找2.7.x中的最新版本)
conda create --name python27 python=2.7
# To activate this environment, use
#
# $ conda activate python37
#
# To deactivate an active environment, use
#
# $ conda deactivate
其余,同理
C:\Users\Administrator>conda info --e
# conda environments:
#
base * D:\Anaconda3
python27 D:\Anaconda3\envs\python27
python37 D:\Anaconda3\envs\python37
spider汉化
在Preference->General->Advanced Setings->Language->语言
github找汉化包,
python main.py
即可,剩下编程是一样的
浙公网安备 33010602011771号