服務器安裝conda環(huán)境遇到代理PROXY問題及解決方案
背景
ProxyError: Conda cannot proceed due to an error in your proxy configuration.
使用的是組里的服務器,主要是在創(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.
解決方案
首先進入**.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準備安裝一些依賴包的時候,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**文件進行修改,首先查看自己的代理ip
~$ echo $http_proxy http://...
復制打印出的代理ip地址并添加到**.condarc**配置文件中。(地址都是http,不是https)
proxy_servers: http: http://... https: http://... ssl_verify: False
以上就是服務器安裝conda環(huán)境遇到代理PROXY問題及解決方案的詳細內(nèi)容,更多關于服務器安裝conda PROXY的資料請關注腳本之家其它相關文章!
相關文章
Cloudflare免費免備案cdn加速優(yōu)化設置方法指南
CDN加速是利用節(jié)點讓用戶建成訪問時,直接將緩存好的靜態(tài)文件交給用戶。還可以隱藏我們網(wǎng)站的IP地址,變得更安全。Cloudflare?CDN免費加速你的網(wǎng)站,合適的配置會使我們網(wǎng)站的訪問速度和安全性都得到進一步的提升。2023-04-04Dell R730服務器6i陣列卡Raid5配置方法(熱備)
這篇文章主要介紹了Dell R730服務器6i陣列卡Raid5配置方法,需要的朋友可以參考下2018-05-05HTTP響應字段Transfer-Encoding含義及作用詳解
在HTTP通信中,響應正文可以以多種不同的編碼方式傳輸,其中一種方式是chunked傳輸編碼,本文將詳細介紹Transfer-Encoding字段的含義和chunked傳輸編碼,以及提供示例來解釋這些概念2023-11-11護衛(wèi)神 主機管理系統(tǒng)使用說明篇 系統(tǒng)設置
護衛(wèi)神·主機管理系統(tǒng)支持在Windows Server 2003/2008/2012,含32位和64位,直接開設配置WEB站、FTP站,以及SQL Server和MySQL,是您開設和管理虛擬主機的絕好幫手,但是對于新用戶可能在使用上有一些困難,因此請仔細閱讀如下說明文檔2015-01-01