更新TensorFlow

Brm*_*ßio 22 python upgrade deep-learning tensorflow

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

$ pip install --upgrade $TF_BINARY_URL
Run Code Online (Sandbox Code Playgroud)

但它打印:

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
Run Code Online (Sandbox Code Playgroud)

Pan*_* Li 63

(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
Run Code Online (Sandbox Code Playgroud)

有关安装tensorflow的详细信息.


Sal*_*ali 21

要升级任何python包,请使用pip install <pkg_name> --upgrade.

所以在你的情况下它会pip install tensorflow --upgrade.刚更新到1.1.0


0xA*_*iHn 5

这是升级Tensorflow的官方建议。

要获取TensorFlow 1.5,您可以使用标准的pip安装(如果使用python3,则可以使用pip3)

$  pip install --ignore-installed --upgrade tensorflow
Run Code Online (Sandbox Code Playgroud)


Har*_*wat 5

Tensorflow 升级-Python3

>> pip3 install --upgrade tensorflow --user
Run Code Online (Sandbox Code Playgroud)

如果你有这个

“错误:tensorboard 2.0.2 要求 grpcio>=1.24.3,但您将拥有不兼容的 grpcio 1.22.0。”

升级 grpcio

>> pip3 install --upgrade grpcio --user
Run Code Online (Sandbox Code Playgroud)