conda 在斷網情況下創建虛擬環境

問題:conda create -n example 創建虛擬環境失敗
報錯
Solving environment: done
CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://repo.anaconda.com/pk
gs/r/win-64/repodata.json.bz2>
Elapsed: -
An HTTP error occurred when trying to retrieve this URL.
HTTP errors are often intermittent, and a simple retry will get you on your way.
ConnectionError(MaxRetryError(“HTTPSConnectionPool(host=‘repo.anaconda.com’, por
t=443): Max retries exceeded with url: /pkgs/r/win-64/repodata.json.bz2 (Caused
by NewConnectionError(’<urllib3.connection.VerifiedHTTPSConnection object at 0x0
000001A00393C88>: Failed to establish a new connection: [Errno 11004] getaddrinf
o failed’,))”,),)
顯示配置內容
conda config --show
顯示配置文件的路徑
conda config --show-sources
c:\users**.condarc
解決方案:
方案一:斷網創建
conda create -n example --offline
方案二:複製base 環境
conda create -n example --clone base

作者:萬事皆成
鏈接:https://www.jianshu.com/p/caba68553974
來源:簡書
簡書著作權歸作者所有,任何形式的轉載都請聯繫作者獲得授權並註明出處。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章