服務(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)境中使用運行時都出現(xiàn)了同樣的ProxyError,主要是因為conda沒法處理代理,因此得要用戶手動修改**.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)文章
使用華為云鯤鵬彈性云服務(wù)器部署Discuz的詳細(xì)過程
這篇文章主要介紹了使用華為云鯤鵬彈性云服務(wù)器部署Discuz,本文給大家介紹的非常詳細(xì),對大家的學(xué)習(xí)或工作具有一定的參考借鑒價值,需要的朋友可以參考下2023-05-05Cloudflare免費免備案cdn加速優(yōu)化設(shè)置方法指南
CDN加速是利用節(jié)點讓用戶建成訪問時,直接將緩存好的靜態(tài)文件交給用戶。還可以隱藏我們網(wǎng)站的IP地址,變得更安全。Cloudflare?CDN免費加速你的網(wǎng)站,合適的配置會使我們網(wǎng)站的訪問速度和安全性都得到進(jìn)一步的提升。2023-04-0432位操作系統(tǒng)認(rèn)出超出4G內(nèi)存的方法
編輯操作系統(tǒng)安裝盤下boot.ini文件(隱藏文件),在[operating systems]的行后,加入/PAE,保存,重啟系統(tǒng)后,就會認(rèn)出超出4G的內(nèi)存。2009-06-06Dell R730服務(wù)器6i陣列卡Raid5配置方法(熱備)
這篇文章主要介紹了Dell R730服務(wù)器6i陣列卡Raid5配置方法,需要的朋友可以參考下2018-05-05HTTP響應(yīng)字段Transfer-Encoding含義及作用詳解
在HTTP通信中,響應(yīng)正文可以以多種不同的編碼方式傳輸,其中一種方式是chunked傳輸編碼,本文將詳細(xì)介紹Transfer-Encoding字段的含義和chunked傳輸編碼,以及提供示例來解釋這些概念2023-11-11護(hù)衛(wèi)神 主機(jī)管理系統(tǒng)使用說明篇 系統(tǒng)設(shè)置
護(hù)衛(wèi)神·主機(jī)管理系統(tǒng)支持在Windows Server 2003/2008/2012,含32位和64位,直接開設(shè)配置WEB站、FTP站,以及SQL Server和MySQL,是您開設(shè)和管理虛擬主機(jī)的絕好幫手,但是對于新用戶可能在使用上有一些困難,因此請仔細(xì)閱讀如下說明文檔2015-01-01