- Pip 安裝
我在使用pip安裝軟件時(shí)常遇到網(wǎng)速極慢,鏈接超時(shí)自動(dòng)斷開(kāi)。
解決方法參考別人帖子:
1)更換為國(guó)內(nèi)鏡像源;
2)更改鏈接時(shí)間限制;
以下載pytorch為例:
原始命令:
pip install torch
更換為:
pip --default-timeout=100000 install torch -i https://mirrors.aliyun.com/pypi/simple/
以下列出其他鏡像源地址
(1)阿里云 https://mirrors.aliyun.com/pypi/simple/
(2)豆瓣https://pypi.douban.com/simple/
(3)清華大學(xué) https://pypi.tuna.tsinghua.edu.cn/simple/
(4)中國(guó)科學(xué)技術(shù)大學(xué) http://pypi.mirrors.ustc.edu.cn/simple/
(5)華中科技大學(xué)http://pypi.hustunique.com/
- conda 安裝
網(wǎng)上教程多是將conda 源更換為國(guó)內(nèi)鏡像,但最近即使更換為清華源,也會(huì)發(fā)生連不上網(wǎng)錯(cuò)誤,筆者發(fā)現(xiàn)可以進(jìn)清華源官網(wǎng),下載需要版本的 .tar.bz2安裝包,再傳于服務(wù)器中,使用命令:
conda install --use-local *.tar.bz2
即可實(shí)現(xiàn)離線安裝