pip源、conda源,离线安装,

1、pip

pip在安装的时候直接指定源,使用参数 -i

pip install tensorflow-gpu==1.14 -i https://pypi.tuna.tsinghua.edu.cn/simple

指定文件+指定源,使用参数 -i , -r

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

常用源

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

pip和conda安装包还不太一样

2、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/pkgs/main/
conda config --set show_channel_urls yes
查看当前的 cofig
conda config --show
查看添加的镜像:
conda config --get channels
删除源
conda config --remove-key channels

最后,C:\Users\xxx\.condarc,文件长这样

ssl_verify: true
channels:
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
  - defaults
show_channel_urls: true

3、离线安装

https://mirrors.tuna.tsinghua.edu.cn/anaconda
conda install --use-local pytorch-1.2.0-py3.7_cuda100_cudnn7_1.tar.bz2

windows jupyter notebook 切换默认环境

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容