【python】conda/pip常用命令

//查看版本
conda --version
//创建环境
conda create -n name_example python=3.5
//进入环境
activate name_example
 //查看有哪些虚拟环境
 conda env list
 //在环境当中加包
 conda install django=2.0
 //查看环境下有哪些包
 conda list
 //升级包
 conda update django
 //删除包
 conda remove django
 //删除环境与其包
 conda remove -n name_example --all
 conda env list

anaconda同时安装多个第三方包
参考https://blog.csdn.net/zhangzhoubin666/article/details/121998615

cmd或者从anaconda 的命令行中中进入txt文件所在路径下,运行下面的命令行即可:

1)不采用镜像的方式,命令行如下:

pip install -r requirements.txt

2)采用镜像的方式,命令行如下:

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple   -r requirements.txt

其中,比较常用的国内镜像包括:

(1)阿里云 http://mirrors.aliyun.com/pypi/simple/
(2)豆瓣http://pypi.douban.com/simple/
(3)清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/
(4)中国科学技术大学 http://pypi.mirrors.ustc.edu.cn/simple/
(5)华中科技大学http://pypi.hustunique.com/

猜你喜欢

转载自blog.csdn.net/m0_57168310/article/details/125876455