Conda鏡像添加

安裝conda后,將包管理鏡像修改為國(guó)內(nèi)源

conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/

conda config --set show_channel_urls yes

在下載pydeseq2前,先創(chuàng)建一個(gè)名為pydeseq2的虛擬環(huán)境

conda create -n pydeseq2

報(bào)錯(cuò)

Solving environment: done

CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://repo.anaconda.com/pkgs/main/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.

If your current network has https://www.anaconda.com blocked, please filea support request with your network engineering team.

ConnectionError(MaxRetryError('HTTPSConnectionPool(host=\'repo.anaconda.com\', port=443): Max retries exceeded with url: /pkgs/main/win-64/repodata.json.bz2 (Caused by ReadTimeoutError("HTTPSConnectionPool(host=\'repo.anaconda.com\', port=443): Read timed out. (read timeout=9.15)"))'))

解決過(guò)程

出現(xiàn)這個(gè)報(bào)錯(cuò)應(yīng)該是之前設(shè)置的鏡像不能用了

首先顯示所有channel

conda config --show channels

存在兩個(gè)channel,一個(gè)默認(rèn)channel,一個(gè)是之前添加的channel

channels:

- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/

- defaults

因?yàn)橹霸O(shè)置的這個(gè)清華源channel已經(jīng)不能用了,才導(dǎo)致報(bào)錯(cuò),所以先刪除這個(gè)channel

conda config --remove channels?https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/

再次檢查現(xiàn)存channel, 發(fā)現(xiàn)之前添加清華源channel已經(jīng)刪除

conda config --show channels

## channels:

- defaults

添加可用的清華源channel

conda config --add channels?rsync://mirrors.tuna.tsinghua.edu.cn/anaconda/

conda config --add channels?https://repo.continuum.io/

conda config --set show_channel_urls yes

設(shè)置conda config --set show_channel_urls yes可以在從channel中安裝包時(shí)顯示channel的url,這樣就可以知道包的安裝來(lái)源了。

問(wèn)題沒(méi)有解決,待續(xù)

根據(jù)CSDN中

Conda創(chuàng)建環(huán)境失?。篊ondaHTTPError: HTTP 000 CONNECTION FAILED-CSDN博客

仍然報(bào)錯(cuò),但是報(bào)錯(cuò)代碼變了

CondaHTTPError: HTTP 404 NOT FOUND for url <https://mirrors.jlu.edu.cn/noarch/repodata.json>

Elapsed: 00:00.181423

The remote server could not find the noarch directory for the

requested channel with url: https://mirrors.jlu.edu.cn

As of conda 4.3, a valid channel must contain a `noarch/repodata.json` and

associated `noarch/repodata.json.bz2` file, even if `noarch/repodata.json` is

empty. please request that the channel administrator create

`noarch/repodata.json` and associated `noarch/repodata.json.bz2` files.

$ mkdir noarch

$ echo '{}' > noarch/repodata.json

$ bzip2 -k noarch/repodata.json

You will need to adjust your conda configuration to proceed.

Use `conda config --show channels` to view your configuration's current state.

Further configuration help can be found at <https://conda.io/docs/config.html>.

繼續(xù),通過(guò)閱讀博文

Anaconda :解決 CondaHTTPError 問(wèn)題(必定有效版) - 知乎 (zhihu.com)

問(wèn)題解決,就是根據(jù)清華大學(xué)開(kāi)源軟件鏡像站給出的配置修改路徑

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書(shū)系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容