💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
[toc] ## Anaconda环境安装问题 ### 问题1:current_repodata.json找不到 新建conda环境报错 ``` C:\Users\Lijx>conda create -n pytorch python=3.7 Collecting package metadata (current_repodata.json): failed CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/win-64/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. SSLError(MaxRetryError('HTTPSConnectionPool(host=\'mirrors.tuna.tsinghua.edu.cn\', port=443): Max retries exceeded with url: /anaconda/pkgs/main/win-64/current_repodata.json (Caused by SSLError("Can\'t connect to HTTPS URL because the SSL module is not available."))')) ``` 经排查,确认没有这个文件。正确的文件名为:`repodata.json`。 ![](https://gitee.com/cowboy2014/cloud2020-config/raw/master/pictures/20210815165746.png) 那么,**current_repodata.json**这个文件究竟是配置在哪里的呢? ``` C:\Users\Lijx>conda config --show-sources ==> C:\Users\Lijx\.condarc <== ssl_verify: True channels: - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/ - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/ - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/ - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/ show_channel_urls: True ``` #### 解决方案 把路径“*Anaconda3/Library/bin*“目录下的**libcrypto-1\_1-x64.dll**和**libssl-1\_1-x64.dll**拷贝到“*Anaconda3/DLLs*”目录下即可。 ### 问题2:ssl模块不可用 网络问题 ``` E:\AIStudy\code\Machine-Learning-for-OpenCV-Second-Edition>conda env create -f environment.yml Collecting package metadata (repodata.json): failed CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://conda.anaconda.org/conda-forge/win-64/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. SSLError(MaxRetryError('HTTPSConnectionPool(host=\'conda.anaconda.org\', port=443): Max retries exceeded with url: /conda-forge/win-64/repodata.json (Caused by SSLError("Can\'t connect to HTTPS URL because the SSL module is not available."))')) ``` ``` #首先先添加清华的镜像源 conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/ conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/ conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/ conda config --set show_channel_urls yes ``` 需要修改配置文件:condarc,删除`-defaults`。 ``` ## windows下: Anaconda3\pkgs\conda-4.7.12-py37_0\info\test\tests\condarc ``` 修改channels为: ``` channels: - binstar_username - http://some.custom/channel - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/ - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/ - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/ - https://nanomirrors.tuna.tsinghua.edu.cn/anaconda/cloud - https://nanomirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda - https://nanomirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda/conda ``` > [参考内容](https://blog.csdn.net/ada0915/article/details/78529877)