anacanda配置TensorFlow时报错的解决方案

在Anacanda中配置TensorFlow时,会出现这样的错误:

CondaHTTPError: HTTP 000 CONNECTION FAILED for url
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=\'www.lfd.uci.edu\', port=443): Max retries exceeded with url: /~gohlke/pythonlibs/win-64/repodata.json (Caused by ProtocolError(\'Connection aborted.\', OSError("(10054, \'WSAECONNRESET\')",)))',),)

此时可以将C:\User(用户)\username(系统用户目录)\.condarc中的内容修改成如下内容:

channels:
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/win-64
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/noarch
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/win-64
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/noarch
show_channel_urls: true
 

你可能感兴趣的:(编程中遇到的一些错误)