win10中通过Anaconda安装tensorflow时报错Traceback (most recent call last): File “E:\Anaconda3\lib\site-packages\pip_vendor\urllib3\response.py”, line 360, in _error_catcher yield

问题:通过默认镜像安装,下载过程中可能会报错,下载安装失败

Traceback (most recent call last):
File “E:\Anaconda3\lib\site-packages\pip_vendor\urllib3\response.py”, line 360, in _error_catcher
yield
File “E:\Anaconda3\lib\site-packages\pip_vendor\urllib3\response.py”, line 442, in read
data = self._fp.read(amt)
File “E:\Anaconda3\lib\site-packages\pip_vendor\cachecontrol\filewrapper.py”, line 62, in read
data = self.__fp.read(amt)
File “E:\Anaconda3\lib\http\client.py”, line 447, in read
n = self.readinto(b)
File “E:\Anaconda3\lib\http\client.py”, line 491, in readinto
n = self.fp.readinto(b)
File “E:\Anaconda3\lib\socket.py”, line 589, in readinto
return self._sock.recv_into(b)
File “E:\Anaconda3\lib\ssl.py”, line 1052, in recv_into
return self.read(nbytes, buffer)
File “E:\Anaconda3\lib\ssl.py”, line 911, in read
return self._sslobj.read(len, buffer)
socket.timeout: The read operation timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “E:\Anaconda3\lib\site-packages\pip_internal\cli\base_command.py”, line 179, in main
status = self.run(options, args)
File “E:\Anaconda3\lib\site-packages\pip_internal\commands\install.py”, line 315, in run
resolver.resolve(requirement_set)
File “E:\Anaconda3\lib\site-packages\pip_internal\resolve.py”, line 131, in resolve
self._resolve_one(requirement_set, req)
File “E:\Anaconda3\lib\site-packages\pip_internal\resolve.py”, line 294, in _resolve_one
abstract_dist = self._get_abstract_dist_for(req_to_install)
File “E:\Anaconda3\lib\site-packages\pip_internal\resolve.py”, line 242, in _get_abstract_dist_for
self.require_hashes
File “E:\Anaconda3\lib\site-packages\pip_internal\operations\prepare.py”, line 334, in prepare_linked_requirement
progress_bar=self.progress_bar
File “E:\Anaconda3\lib\site-packages\pip_internal\download.py”, line 878, in unpack_url
progress_bar=progress_bar
File “E:\Anaconda3\lib\site-packages\pip_internal\download.py”, line 702, in unpack_http_url
progress_bar)
File “E:\Anaconda3\lib\site-packages\pip_internal\download.py”, line 946, in _download_http_url
_download_url(resp, link, content_file, hashes, progress_bar)
File “E:\Anaconda3\lib\site-packages\pip_internal\download.py”, line 639, in _download_url
hashes.check_against_chunks(downloaded_chunks)
File “E:\Anaconda3\lib\site-packages\pip_internal\utils\hashes.py”, line 62, in check_against_chunks
for chunk in chunks:
File “E:\Anaconda3\lib\site-packages\pip_internal\download.py”, line 607, in written_chunks
for chunk in chunks:
File “E:\Anaconda3\lib\site-packages\pip_internal\utils\ui.py”, line 159, in iter
for x in it:
File “E:\Anaconda3\lib\site-packages\pip_internal\download.py”, line 596, in resp_read
decode_content=False):
File “E:\Anaconda3\lib\site-packages\pip_vendor\urllib3\response.py”, line 494, in stream
data = self.read(amt=amt, decode_content=decode_content)
File “E:\Anaconda3\lib\site-packages\pip_vendor\urllib3\response.py”, line 459, in read
raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
File “E:\Anaconda3\lib\contextlib.py”, line 130, in exit
self.gen.throw(type, value, traceback)
File “E:\Anaconda3\lib\site-packages\pip_vendor\urllib3\response.py”, line 365, in _error_catcher
raise ReadTimeoutError(self._pool, None, ‘Read timed out.’)
pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host=‘files.pythonhosted.org’, port=443): Read timed out.

解决方法:一般可以考虑更换镜像源

 pip install tensorflow -i https://pypi.douban.com/simple

结果:安装成功,并且速度快

(base) C:\Users\Administrator>pip install tensorflow -i https://pypi.douban.com/simple
Looking in indexes: https://pypi.douban.com/simple
Collecting tensorflow
Downloading https://pypi.doubanio.com/packages/7b/14/e4538c2bc3ae9f4ce6f6ce7ef1180da05abc4a617afba798268232b01d0d/tensorflow-1.13.1-cp37-cp37m-win_amd64.whl (63.1MB)
100% |████████████████████████████████| 63.1MB 207kB/s
Collecting keras-preprocessing>=1.0.5 (from tensorflow)
Downloading https://pypi.doubanio.com/packages/c0/bf/0315ef6a9fd3fc2346e85b0ff1f5f83ca17073f2c31ac719ab2e4da0d4a3/Keras_Preprocessing-1.0.9-py2.py3-none-any.whl (59kB)
100% |████████████████████████████████| 61kB 4.1MB/s
Requirement already satisfied: numpy>=1.13.3 in e:\anaconda3\lib\site-packages (from tensorflow) (1.16.2)
Collecting tensorboard<1.14.0,>=1.13.0 (from tensorflow)
Downloading https://pypi.doubanio.com/packages/0f/39/bdd75b08a6fba41f098b6cb091b9e8c7a80e1b4d679a581a0ccd17b10373/tensorboard-1.13.1-py3-none-any.whl (3.2MB)
100% |████████████████████████████████| 3.2MB 4.5MB/s
Requirement already satisfied: six>=1.10.0 in e:\anaconda3\lib\site-packages (from tensorflow) (1.12.0)
Requirement already satisfied: wheel>=0.26 in e:\anaconda3\lib\site-packages (from tensorflow) (0.33.1)
Collecting gast>=0.2.0 (from tensorflow)
Downloading https://pypi.doubanio.com/packages/4e/35/11749bf99b2d4e3cceb4d55ca22590b0d7c2c62b9de38ac4a4a7f4687421/gast-0.2.2.tar.gz
Collecting tensorflow-estimator<1.14.0rc0,>=1.13.0 (from tensorflow)
Downloading https://pypi.doubanio.com/packages/bb/48/13f49fc3fa0fdf916aa1419013bb8f2ad09674c275b4046d5ee669a46873/tensorflow_estimator-1.13.0-py2.py3-none-any.whl (367kB)
100% |████████████████████████████████| 368kB 7.3MB/s
Collecting termcolor>=1.1.0 (from tensorflow)
Downloading https://pypi.doubanio.com/packages/8a/48/a76be51647d0eb9f10e2a4511bf3ffb8cc1e6b14e9e4fab46173aa79f981/termcolor-1.1.0.tar.gz
Collecting keras-applications>=1.0.6 (from tensorflow)
Downloading https://pypi.doubanio.com/packages/90/85/64c82949765cfb246bbdaf5aca2d55f400f792655927a017710a78445def/Keras_Applications-1.0.7-py2.py3-none-any.whl (51kB)
100% |████████████████████████████████| 61kB 3.1MB/s
Collecting absl-py>=0.1.6 (from tensorflow)
Downloading https://pypi.doubanio.com/packages/da/3f/9b0355080b81b15ba6a9ffcf1f5ea39e307a2778b2f2dc8694724e8abd5b/absl-py-0.7.1.tar.gz (99kB)
100% |████████████████████████████████| 102kB 12.8MB/s
Collecting grpcio>=1.8.6 (from tensorflow)
Downloading https://pypi.doubanio.com/packages/2a/22/bd327063dd0bdf9d8d640b3185b760707842160e69df909db3fcaab5b758/grpcio-1.20.1-cp37-cp37m-win_amd64.whl (1.6MB)
100% |████████████████████████████████| 1.6MB 6.4MB/s
Collecting astor>=0.6.0 (from tensorflow)
Downloading https://pypi.doubanio.com/packages/d1/4f/950dfae467b384fc96bc6469de25d832534f6b4441033c39f914efd13418/astor-0.8.0-py2.py3-none-any.whl
Collecting protobuf>=3.6.1 (from tensorflow)
Downloading https://pypi.doubanio.com/packages/34/ef/f020691889031a8e1d8cb20711daa43cfe999e0768ff6903c4bf70c2eecd/protobuf-3.7.1-cp37-cp37m-win_amd64.whl (986kB)
100% |████████████████████████████████| 993kB 7.9MB/s
Requirement already satisfied: werkzeug>=0.11.15 in e:\anaconda3\lib\site-packages (from tensorboard<1.14.0,>=1.13.0->tensorflow) (0.14.1)
Collecting markdown>=2.6.8 (from tensorboard<1.14.0,>=1.13.0->tensorflow)
Downloading https://pypi.doubanio.com/packages/c0/4e/fd492e91abdc2d2fcb70ef453064d980688762079397f779758e055f6575/Markdown-3.1.1-py2.py3-none-any.whl (87kB)
100% |████████████████████████████████| 92kB 5.1MB/s
Collecting mock>=2.0.0 (from tensorflow-estimator<1.14.0rc0,>=1.13.0->tensorflow)
Downloading https://pypi.doubanio.com/packages/05/d2/f94e68be6b17f46d2c353564da56e6fb89ef09faeeff3313a046cb810ca9/mock-3.0.5-py2.py3-none-any.whl
Requirement already satisfied: h5py in e:\anaconda3\lib\site-packages (from keras-applications>=1.0.6->tensorflow) (2.9.0)
Requirement already satisfied: setuptools in e:\anaconda3\lib\site-packages (from protobuf>=3.6.1->tensorflow) (40.8.0)
Building wheels for collected packages: gast, termcolor, absl-py
Building wheel for gast (setup.py) … done
Stored in directory: C:\Users\Administrator\AppData\Local\pip\Cache\wheels\6c\eb\97\547988c386be0acb0797611e9b1a96564e7200bf60be924c80
Building wheel for termcolor (setup.py) … done
Stored in directory: C:\Users\Administrator\AppData\Local\pip\Cache\wheels\15\b4\7c\713366bcd4e4f6d38377a66e0742bd15e6920b1939be008dbb
Building wheel for absl-py (setup.py) … done
Stored in directory: C:\Users\Administrator\AppData\Local\pip\Cache\wheels\85\02\e5\139c27ec57828631565111db6facbddd0eb13bf73e1764e8c0
Successfully built gast termcolor absl-py
Installing collected packages: keras-preprocessing, protobuf, markdown, grpcio, absl-py, tensorboard, gast, mock, tensorflow-estimator, termcolor, keras-applications, astor, tensorflow
Successfully installed absl-py-0.7.1 astor-0.8.0 gast-0.2.2 grpcio-1.20.1 keras-applications-1.0.7 keras-preprocessing-1.0.9 markdown-3.1.1 mock-3.0.5 protobuf-3.7.1 tensorboard-1.13.1 tensorflow-1.13.1 tensorflow-estimator-1.13.0 termcolor-1.1.0

 



原文地址:https://www.cnblogs.com/dawankuanmian/p/11526328.html

时间: 2024-10-28 08:06:55

win10中通过Anaconda安装tensorflow时报错Traceback (most recent call last): File “E:\Anaconda3\lib\site-packages\pip_vendor\urllib3\response.py”, line 360, in _error_catcher yield的相关文章

Win10下用Anaconda安装TensorFlow

笔者之前在学习TensorFlow,也在自己的笔记本上完成了安装,在PyCharm中进行学习.但是最近为了使用Python的科学计算环境,我把之前的环境卸载了,并用Anaconda重新安装了TensorFlow,这里介绍一下cpu版本的安装方法. 前提检查: 在 https://developer.nvidia.com/cuda-gpus 确认你的显卡支持 CUDA,如果你安装的是gpu版本的tensorflow才需要检查这一步. 确保你的Python版本是3.5 64位. 确保你有稳定的网络连

win7系统中使用anaconda安装tensorflow(转)

一. 安装Anaconda3 选择相应版本的Anaconda安装,因为官网直接下载的速度太慢,我们选择从清华大学开源软件镜像站下载.下载地址:https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/ 进入网站后,下拉到底部,选择windows版本下载. 安装过程中,直接点Next即可,安装位置最好选择默认可以省去许多麻烦. 到图中这一步时,注意全部勾选,不需要管红色的提示! 这样Anaconda就安装完毕,按照如下步骤继续进行: 1.运行 开始

python3 安装scrapy Exception: Traceback (most recent call last): File &quot;/usr/lib/python3/dist-packages/pip/req/req_install.py&quot;, line 1006, in check_if_exists解决方法

错误代码: Exception: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/pip/req/req_install.py", line 1006, in check_if_exists self.satisfied_by = pkg_resources.get_distribution(str(no_marker)) File "/usr/share/python-wheel

win10下pip3安装tesserocr时报错

使用pip3在线安装tesserocr时报错,刚开始报错内容是提示未安装vs2014,安装完以后报错内容如下 ERROR: Command errored out with exit status 1: command: 'c:\users\administrator\appdata\local\programs\python\python37\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"

win10下通过Anaconda安装TensorFlow-GPU1.3版本,并配置pycharm运行Mnist手写识别程序

折腾了一天半终于装好了win10下的TensorFlow-GPU版,在这里做个记录. 准备安装包: visual studio 2015: Anaconda3-4.2.0-Windows-x86_64: pycharm-community: CUDA:cuda_8.0.61_win10:下载时选择 exe(local) CUDA补丁:cuda_8.0.61.2_windows: cuDNN:cudnn-8.0-windows10-x64-v6.0;如果你安装的TensorFlow版本和我一样1.

anaconda安装tensorflow问题: Could not find a version that satisfies the requirement tensorboard

背景:想要为下载的anaconda安装tensorflow 使用命令 pip install -i https://pypi.tuna.tsinghua.edu.cn/simple tensorflow 报错如下: 解决办法:创建一个虚拟虚拟环境,在虚拟环境中安装tensorflow,然后使用pycharm创建项目,指定项目的运行环境为刚才创建的虚拟环境. 一:创建虚拟环境:conda create -n test python=3.5 -n后面是虚拟环境的名字   python=指定虚拟环境使

安装cx_Oracle时报错:error: command &#39;gcc&#39; failed with exit status 1

1.安装cx_Oracle 1)下载cx_Oracle,https://pypi.python.org/pypi 2)解压压缩包 3)执行python setup.py install 执行后报错:error: command 'gcc' failed with exit status 1 排查: 1)检查是否安装oracle客户端软件 2)查看当前环境变量中是否配置oracle的相关变量,如echo $ORACLE_HOME 3)如果没有配置需要将oracle环境变量配置到当前用户.bash_

使用anaconda安装tensorflow (windows10环境)

版权声明:勤学 修德 明辨 笃实 - CSDN周雄伟 https://blog.csdn.net/ebzxw/article/details/80701613 已有环境:python3.7.1 anaconda隔离管理多个环境,互不影响.这里,在anaconda中安装最新的python3.6.5 版本. linux环境下使用anaconda安装tensorflow步骤见:https://blog.csdn.net/ebzxw/article/details/80693152 一. 安装anaco

三星笔记本安装系统时报错:image failed to verify with * access denied* press any key to continue.

安装系统从光盘启动报错: 出现黑屏,并且有一个提示框image failed to verify with *access denied*press any key to continue 原因:三星笔记本对系统有降级保护,在将win8改装为win7是,需要设置bios. 1.开机按F2 进入bios,找到Boot-->secure boot-->改为:disabled---->OS Mode Selection改为:CSM OS. 2.在 advanced-->fast bios