conda和pip管理环境

切换64位和32位:set CONDA_FORCE_32BIT=1是切换到32位;set CONDA_FORCE_32BIT= 0是切换到64位

创建环境:

conda create -n py36 python=3.6 

删除环境

conda remove -n py36 --all

激活环境

call activate py36

退出环境

call deactivate


conda 换源

# 清华源
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 --add channels https://mirrors.aliyun.com/anaconda/pkgs/main
conda config --add channels https://mirrors.aliyun.com/anaconda/pkgs/r
conda config --add channels https://mirrors.aliyun.com/anaconda/pkgs/msys2

# 中科大源
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/pkgs/main/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/

pip 换源

# 清华源
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
pip config set install.trusted-host pypi.tuna.tsinghua.edu.cn
 
# 阿里源
pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/
pip config set install.trusted-host mirrors.aliyun.com

pip 从本地项目安装:

pip install git+file:///path/to/project/
# 示例
pip install git+file:///d/project/python-etcd3/
posted @ 2019-04-18 10:39  Coodyzのblog  阅读(9030)  评论(0编辑  收藏  举报