新機器配置 Anaconda 首先更換國內源,根據清華大學開源軟件鏡像站中說明,修改~/.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 改成了清華源。
接下來美滋滋地創建新環境安裝化學信息學必備的 RDKit conda create -c conda-forge -n rdkit rdkit,運行了一會兒,沒想到扔出了 CondaHTTPError。
(base) chloe@ChloedeMacBook-Pro ~ % conda create -c conda-forge -n rdkit rdkit
Collecting package metadata (current_repodata.json): failed
CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/noarch/current_repodata.json>
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.
'https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/noarch'
查閱 Anaconda 文檔中關於 HTTP 000 CONNECTION FAILED 的說明,取消 SSL 驗證即可:
conda config --set ssl_verify false
