使用anaconda3 python 3.5进行Tensorflow安装时出现“读取超时错误”

Chaymae Ahmed

我正在尝试使用python3.6和anaconda 3安装tensorflow-gpu,我正在遵循以下链接中的安装步骤https://www.tensorflow.org/install/install_windows

1-我通过调用以下命令创建了一个名为tensorflow的conda环境:

C:> conda创建-n tensorflow python = 3.6

2-然后通过发出以下命令激活conda环境:

C:>激活张量流(tensorflow)C:>

但是这是在我的conda环境中安装TensorFlow的最后一步使用该命令pip install --ignore-installed --upgrade tensorflow-gpu我得到了那个错误

(C:\Users\Chaymae\Anaconda3) C:\WINDOWS\system32>activate tensorflow

(tensorflow) C:\WINDOWS\system32>pip install --ignore-installed --upgrade tensorflow-gpu
Collecting tensorflow-gpu
  Downloading tensorflow_gpu-1.4.0-cp36-cp36m-win_amd64.whl (67.6MB)
    25% |████████                        | 16.9MB 5.3kB/s eta 2:38:22Exception:
Traceback (most recent call last):
  File "C:\Users\Chaymae\Anaconda3\envs\tensorflow\lib\site-packages\pip\_vendor\urllib3\response.py", line 302, in _error_catcher
    yield
  File "C:\Users\Chaymae\Anaconda3\envs\tensorflow\lib\site-packages\pip\_vendor\urllib3\response.py", line 384, in read
    data = self._fp.read(amt)
  File "C:\Users\Chaymae\Anaconda3\envs\tensorflow\lib\site-packages\pip\_vendor\cachecontrol\filewrapper.py", line 60, in read
    data = self.__fp.read(amt)
  File "C:\Users\Chaymae\Anaconda3\envs\tensorflow\lib\http\client.py", line 449, in read
    n = self.readinto(b)
  File "C:\Users\Chaymae\Anaconda3\envs\tensorflow\lib\http\client.py", line 493, in readinto
    n = self.fp.readinto(b)
  File "C:\Users\Chaymae\Anaconda3\envs\tensorflow\lib\socket.py", line 586, in readinto
    return self._sock.recv_into(b)
  File "C:\Users\Chaymae\Anaconda3\envs\tensorflow\lib\ssl.py", line 1009, in recv_into
    return self.read(nbytes, buffer)
  File "C:\Users\Chaymae\Anaconda3\envs\tensorflow\lib\ssl.py", line 871, in read
    return self._sslobj.read(len, buffer)
  File "C:\Users\Chaymae\Anaconda3\envs\tensorflow\lib\ssl.py", line 631, in read
    v = 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 "C:\Users\Chaymae\Anaconda3\envs\tensorflow\lib\site-packages\pip\basecommand.py", line 215, in main
    status = self.run(options, args)
  File "C:\Users\Chaymae\Anaconda3\envs\tensorflow\lib\site-packages\pip\commands\install.py", line 335, in run
    wb.build(autobuilding=True)
  File "C:\Users\Chaymae\Anaconda3\envs\tensorflow\lib\site-packages\pip\wheel.py", line 749, in build
    self.requirement_set.prepare_files(self.finder)
  File "C:\Users\Chaymae\Anaconda3\envs\tensorflow\lib\site-packages\pip\req\req_set.py", line 380, in prepare_files
    ignore_dependencies=self.ignore_dependencies))
  File "C:\Users\Chaymae\Anaconda3\envs\tensorflow\lib\site-packages\pip\req\req_set.py", line 620, in _prepare_file
    session=self.session, hashes=hashes)
  File "C:\Users\Chaymae\Anaconda3\envs\tensorflow\lib\site-packages\pip\download.py", line 821, in unpack_url
    hashes=hashes
  File "C:\Users\Chaymae\Anaconda3\envs\tensorflow\lib\site-packages\pip\download.py", line 659, in unpack_http_url
    hashes)
  File "C:\Users\Chaymae\Anaconda3\envs\tensorflow\lib\site-packages\pip\download.py", line 882, in _download_http_url
    _download_url(resp, link, content_file, hashes)
  File "C:\Users\Chaymae\Anaconda3\envs\tensorflow\lib\site-packages\pip\download.py", line 603, in _download_url
    hashes.check_against_chunks(downloaded_chunks)
  File "C:\Users\Chaymae\Anaconda3\envs\tensorflow\lib\site-packages\pip\utils\hashes.py", line 46, in check_against_chunks
    for chunk in chunks:
  File "C:\Users\Chaymae\Anaconda3\envs\tensorflow\lib\site-packages\pip\download.py", line 571, in written_chunks
    for chunk in chunks:
  File "C:\Users\Chaymae\Anaconda3\envs\tensorflow\lib\site-packages\pip\utils\ui.py", line 139, in iter
    for x in it:
  File "C:\Users\Chaymae\Anaconda3\envs\tensorflow\lib\site-packages\pip\download.py", line 560, in resp_read
    decode_content=False):
  File "C:\Users\Chaymae\Anaconda3\envs\tensorflow\lib\site-packages\pip\_vendor\urllib3\response.py", line 436, in stream
    data = self.read(amt=amt, decode_content=decode_content)
  File "C:\Users\Chaymae\Anaconda3\envs\tensorflow\lib\site-packages\pip\_vendor\urllib3\response.py", line 401, in read
    raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
  File "C:\Users\Chaymae\Anaconda3\envs\tensorflow\lib\contextlib.py", line 99, in __exit__
    self.gen.throw(type, value, traceback)
  File "C:\Users\Chaymae\Anaconda3\envs\tensorflow\lib\site-packages\pip\_vendor\urllib3\response.py", line 307, in _error_catcher
    raise ReadTimeoutError(self._pool, None, 'Read timed out.')
pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='pypi.python.org', port=443): Read timed out.

好吧,那之后我尝试安装cpu版本,我遇到了同样的错误。如果有人能帮助我,我将很感激,我真的很想开始学习tensorflow。

Chaymae Ahmed

仅仅是互联网连接不稳定的问题,它现在已经安装并且运行良好

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

具有现有Python安装的Anaconda3

为什么Anaconda3安装python 2.7

Anaconda3安装Tensorflow时出现问题

安装anaconda3和python2.7后需要安装Python3

在 Anaconda3 中安装 Pillow 后,Python 3 找不到它

安装Anaconda3会将Mac OS X的默认Python版本更改为3.4吗?

在anaconda3中安装openCV-Python.h:无此类文件或目录

使用Selenium,Anaconda3,Python 3.6无法找到find_elements

使用Anaconda3在Pycharm中丢失了我的python.exe

如何使用anaconda3在Visual Studio Code中为python启用intellisense?

安装Anaconda后的Anaconda3和基本环境

如何卸载 Anaconda2 并安装 Anaconda3?

/ anaconda3 / bin / python和/ anaconda3 / bin / python3之间有什么区别?

如何离线安装Anaconda3中的OpenCV3?

带有python 3.5的Anaconda3 2.4安装错误(找不到过程条目; Windows 10)

spacemacs 将 python shell 设置为 Anaconda3 路径

“ anaconda3 / bin”和“ anaconda3 / lib / python3.7 /”下的软件包有什么区别?

为什么无法识别安装在python目录中的模块,却不能识别anaconda3下的模块?

安装Anaconda3后,如何在Windows 10中我的路径目录中声明Python 3.7?

如何修复:KeyError: '__file__' in sitecustomize.py (anaconda3) 使用运行文件 (F5)

无法在 Ubuntu 20.04 上安装 anaconda。~/anaconda3 文件夹未创建?

使用anaconda python3安装opencv 3.1吗?

Anaconda3内的Spyder IDE安装Opticalspy-0.2.1模块错误

扩展中的致命错误:PyThreadState_Get:在 Mac 上将 SWIG 与 Anaconda3 一起使用时没有当前线程

如何获得在Windows 10上为Anaconda3安装软件包的权限?

如何将蟒蛇币安装到anaconda3中?

安装anaconda3后,黑色格式化程序在VSCode中不起作用

Anaconda3 自定义安装位置:“conda”不工作

值错误'/anaconda3/lib/libpython3.7.dylib'不存在?