python – 更新TensorFlow

我正在使用Ubuntu 14.04,我有一个TensorFlow V0.10,但我想更新这个版本.
如果我做:

$pip install --upgrade $TF_BINARY_URL

但它打印:

Exception:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main
    status = self.run(options, args)
  File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 278, in run
    requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
  File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1198, in prepare_files
    do_download,
  File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1376, in unpack_url
    self.session,
  File "/usr/lib/python2.7/dist-packages/pip/download.py", line 572, in unpack_http_url
    download_hash = _download_url(resp, link, temp_location)
  File "/usr/lib/python2.7/dist-packages/pip/download.py", line 433, in _download_url
    for chunk in resp_read(4096):
  File "/usr/lib/python2.7/dist-packages/pip/download.py", line 421, in resp_read
    chunk_size, decode_content=False):
  File "/usr/share/python-wheels/urllib3-1.7.1-py2.py3-none-any.whl/urllib3/response.py", line 225, in stream
    data = self.read(amt=amt, decode_content=decode_content)
  File "/usr/share/python-wheels/urllib3-1.7.1-py2.py3-none-any.whl/urllib3/response.py", line 174, in read
    data = self._fp.read(amt)
  File "/usr/lib/python2.7/httplib.py", line 573, in read
    s = self.fp.read(amt)
  File "/usr/lib/python2.7/socket.py", line 380, in read
    data = self._sock.recv(left)
  File "/usr/lib/python2.7/ssl.py", line 341, in recv
    return self.read(buflen)
  File "/usr/lib/python2.7/ssl.py", line 260, in read
    return self._sslobj.read(len)
SSLError: The read operation timed out

Storing debug log for failure in /home/brm17/.pip/pip.log

解决方法:

(tensorflow)$pip install --upgrade pip  # for Python 2.7
(tensorflow)$pip3 install --upgrade pip # for Python 3.n

(tensorflow)$pip install --upgrade tensorflow      # for Python 2.7
(tensorflow)$pip3 install --upgrade tensorflow     # for Python 3.n
(tensorflow)$pip install --upgrade tensorflow-gpu  # for Python 2.7 and GPU
(tensorflow)$pip3 install --upgrade tensorflow-gpu # for Python 3.n and GPU

(tensorflow)$pip install --upgrade tensorflow-gpu==1.4.1 # for a specific version

详情install tensorflow.

上一篇:「版本更新」GeneXus16 Upgrade 8的特性的特性


下一篇:linux – ubuntu:升级软件(cmake) – 版本消歧(本地编译)