服務(wù)器安裝conda環(huán)境遇到代理PROXY問題及解決方案
背景
ProxyError: Conda cannot proceed due to an error in your proxy configuration.
使用的是組里的服務(wù)器,主要是在創(chuàng)建虛擬環(huán)境以及在已創(chuàng)建的虛擬環(huán)境中使用運(yùn)行時都出現(xiàn)了同樣的ProxyError,主要是因?yàn)閏onda沒法處理代理,因此得要用戶手動修改**.condarc**文件。一共分為兩步
ProxyError: Conda cannot proceed due to an error in your proxy configuration.
Check for typos and other configuration errors in any '.netrc' file in your home directory,
any environment variables ending in '_PROXY', and any other system-wide proxy configuration settings.
1: 創(chuàng)建環(huán)境時出現(xiàn)ProxyError
~$ conda create -n nn Collecting package metadata (current_repodata.json): failed
ProxyError: Conda cannot proceed due to an error in your proxy configuration.
Check for typos and other configuration errors in any '.netrc' file in your home directory,
any environment variables ending in '_PROXY', and any other system-wide proxy
configuration settings.
解決方案
首先進(jìn)入**.condarc**文件,通常為空
~$ vim .condarc
這里對**.condarc**的修改如下:
channels: - defaults show_channel_urls: true default_channels: - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2 custom_channels: conda-forge: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud msys2: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud bioconda: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud menpo: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud pytorch: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud pytorch-lts: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud simpleitk: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
之后conda可以創(chuàng)建虛擬環(huán)境,本以為一切ok準(zhǔn)備安裝一些依賴包的時候,ProxyError再次出現(xiàn)。
2:安裝依賴時出現(xiàn)ProxyError
安裝pytorch時錯誤再次出現(xiàn)
~$ conda install pytorch torchvision torchaudio cudatoolkit=10.2 -c pytorch Collecting package metadata (current_repodata.json): failed
ProxyError: Conda cannot proceed due to an error in your proxy configuration.
Check for typos and other configuration errors in any '.netrc' file in your home directory,
any environment variables ending in '_PROXY', and any other system-wide proxy
configuration settings.
解決方案:
同樣是對**.condarc**文件進(jìn)行修改,首先查看自己的代理ip
~$ echo $http_proxy http://...
復(fù)制打印出的代理ip地址并添加到**.condarc**配置文件中。(地址都是http,不是https)
proxy_servers: http: http://... https: http://... ssl_verify: False
以上就是服務(wù)器安裝conda環(huán)境遇到代理PROXY問題及解決方案的詳細(xì)內(nèi)容,更多關(guān)于服務(wù)器安裝conda PROXY的資料請關(guān)注腳本之家其它相關(guān)文章!
相關(guān)文章
Hadoop中namenode和secondarynamenode工作機(jī)制講解
今天小編就為大家分享一篇關(guān)于Hadoop中namenode和secondarynamenode工作機(jī)制講解,小編覺得內(nèi)容挺不錯的,現(xiàn)在分享給大家,具有很好的參考價值,需要的朋友一起跟隨小編來看看吧2019-01-01
git分支管理_動力節(jié)點(diǎn)Java學(xué)院整理
這篇文章主要為大家詳細(xì)介紹了git分支管理的相關(guān)資料,具有一定的參考價值,感興趣的小伙伴們可以參考一下2017-08-08
妙用.htaccess隱藏網(wǎng)頁文件擴(kuò)展名
我總固執(zhí)地認(rèn)為網(wǎng)頁鏈接后拖著一個.php讓人看著心煩,一心想要找到辦法把它給去掉。雖然網(wǎng)上有對WordPress、Discuz等系統(tǒng)關(guān)于這方面的介紹,但是對于自己設(shè)計的網(wǎng)站就不太好使了2013-12-12
服務(wù)器常用磁盤陣列RAID原理、種類及性能優(yōu)缺點(diǎn)對比
這篇文章主要介紹了磁盤陣列RAID原理、種類及性能優(yōu)缺點(diǎn)對比,根據(jù)硬件與硬盤數(shù)量選擇適合自己的磁盤陣列很重要,需要的朋友可以參考下2018-05-05
TCP服務(wù)器實(shí)現(xiàn)數(shù)據(jù)通信
今天我們要介紹的是使用TCP協(xié)議實(shí)現(xiàn)數(shù)據(jù)通信,相比于之前寫的UDP服務(wù)器實(shí)現(xiàn)數(shù)據(jù)信,在主體邏輯上并沒有差別,下面,我們具體來看看UDP和TCP在編碼的實(shí)現(xiàn)上有什么不同,感興趣的朋友一起看看吧2023-08-08
Linux設(shè)置靜態(tài)IP的實(shí)現(xiàn)步驟
這篇文章主要介紹了Linux設(shè)置靜態(tài)IP的實(shí)現(xiàn)步驟,文中通過示例代碼介紹的非常詳細(xì),對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧2020-03-03

