查看conda的环境目录
conda info --envs
激活一个conda环境
conda activate envs
创建conda环境
conda create -n python==3.7
删除环境
conda remove -n name --all # name表示环境名称
1,临时使用镜像源
pip install numpy -i http://mirrors.aliyun.com/pypi/simple/
2,永久更改镜像源
通过新建pip文件夹实现,首先在文件资源管理器中搜索 %APPDATA% ,新建一个pip文件夹,新建pip.txt文件,输入以下内容
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
然后保存,更改后缀为ini,完成。
或者直接输入以下命令也可以实现永久换源
pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/
3,修改 conda 镜像源
(永久修改)在命令提示符中输入以下内容即可:
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --set show_channel_urls yes
若想查看自己的 channel 有哪些,执行:
conda config --show channels
若想还原默认源,执行:
conda config --remove-key channels
4,使用pip官方源:
有时候我们会遇到第三方源找不到库的情况,这个可能是该源没有更新,导致安装失败,这个时候如果换了很多第三方源都安装不了时,我们就需要使用官方源进行安装
pip install xx -i https://pypi.org/simple
5,常用的镜像源:
(1)豆瓣:http://pypi.douban.com/simple/
(2)阿里云 http://mirrors.aliyun.com/pypi/simple/
(3)清华大学:https://pypi.tuna.tsinghua.edu.cn/simple
(4)中国科学技术大学 : https://pypi.mirrors.ustc.edu.cn/simple
————————————————
版权声明:本文为CSDN博主「XC___XC」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。