所用平台:Win10
在Anaconda Prompt中输入如下命令:
conda create -n TensorFlow1.8 python=3.5
- 1
创建新环境时,报错如下:
Collecting package metadata (current_repodata.json): failed
CondaHTTPError: HTTP 000 CONNECTION FAILED for url https://repo.anaconda.com/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.
If your current network has https://www.anaconda.com blocked, please file
a support request with your network engineering team.
‘https://repo.anaconda.com/pkgs/main/win-64’
试了网上许多种方法,都无法成功。
最终解决方案:
打开清华大学镜像源,网站如下:
https://mirrors.tuna.tsinghua.edu.cn/help/anaconda/
将框中所有代码复制到.condarc文件中,该文件位于
C:\Users\用户名
位置,如果没有,则手动创建并进行粘贴。
之后便可愉快的创建新环境啦!