2017-10-19 2 views
0

Wie aktualisiere ich die Tensoflow-Bibliothek auf meiner Windows-Maschine? Tensorflow ist derzeit installiert und läuft gut. Ich verwende Anaconda-Verteilung.Upgrade Tensorflow auf Windows

import tensorflow as tf 

tf.VERSION 
Out[37]: '1.2.1' 

Meine Python-Version ist unter

>python -V 
Python 3.5.3 :: Anaconda custom (64-bit) 

--------------- Update 1 -------------- ----------------------------

Versuchte erste Antwort und bekam folgende Meldung

>pip install tensorflow --upgrade 
Collecting tensorflow 
    Downloading tensorflow-1.3.0-cp35-cp35m-win_amd64.whl (25.5MB) 
    100% |################################| 25.5MB 47kB/s 
Collecting protobuf>=3.3.0 (from tensorflow) 
    Downloading protobuf-3.4.0-py2.py3-none-any.whl (375kB) 
    100% |################################| 378kB 1.4MB/s 
Requirement already up-to-date: numpy>=1.11.0 in c:\users\johndoe\appdata\local\conda\conda\envs\tensorflowspyder\lib\site-packages (from tensorflow) 
Collecting tensorflow-tensorboard<0.2.0,>=0.1.0 (from tensorflow) 
    Downloading tensorflow_tensorboard-0.1.8-py3-none-any.whl (1.6MB) 
    100% |################################| 1.6MB 591kB/s 
Requirement already up-to-date: six>=1.10.0 in c:\users\johndoe\appdata\local\conda\conda\envs\tensorflowspyder\lib\site-packages (from tensorflow) 
Collecting wheel>=0.26 (from tensorflow) 
    Downloading wheel-0.30.0-py2.py3-none-any.whl (49kB) 
    100% |################################| 51kB 1.2MB/s 
Collecting setuptools (from protobuf>=3.3.0->tensorflow) 
    Downloading setuptools-36.6.0-py2.py3-none-any.whl (481kB) 
    100% |################################| 481kB 1.1MB/s 
Requirement already up-to-date: werkzeug>=0.11.10 in c:\users\johndoe\appdata\local\conda\conda\envs\tensorflowspyder\lib\site-packages (from tensorflow-tensorboard<0.2.0,>=0.1.0->tensorflow) 
Requirement already up-to-date: bleach==1.5.0 in c:\users\johndoe\appdata\local\conda\conda\envs\tensorflowspyder\lib\site-packages (from tensorflow-tensorboard<0.2.0,>=0.1.0->tensorflow) 
Collecting markdown>=2.6.8 (from tensorflow-tensorboard<0.2.0,>=0.1.0->tensorflow) 
    Downloading Markdown-2.6.9.tar.gz (271kB) 
    100% |################################| 276kB 1.5MB/s 
Requirement already up-to-date: html5lib==0.9999999 in c:\users\johndoe\appdata\local\conda\conda\envs\tensorflowspyder\lib\site-packages (from tensorflow-tensorboard<0.2.0,>=0.1.0->tensorflow) 
Building wheels for collected packages: markdown 
    Running setup.py bdist_wheel for markdown ... done 
    Stored in directory: C:\Users\johndoe\AppData\Local\pip\Cache\wheels\bf\46\10\c93e17ae86ae3b3a919c7b39dad3b5ccf09aeb066419e5c1e5 
Successfully built markdown 
Installing collected packages: setuptools, protobuf, markdown, wheel, tensorflow-tensorboard, tensorflow 
    Found existing installation: setuptools 36.2.0 
    Uninstalling setuptools-36.2.0: 
     Successfully uninstalled setuptools-36.2.0 
    Rolling back uninstall of setuptools 
Exception: 
Traceback (most recent call last): 
    File "C:\Users\johndoe\AppData\Local\conda\conda\envs\tensorflowspyder\lib\site-packages\pip\basecommand.py", line 215, in main 
    status = self.run(options, args) 
    File "C:\Users\johndoe\AppData\Local\conda\conda\envs\tensorflowspyder\lib\site-packages\pip\commands\install.py", line 342, in run 
    prefix=options.prefix_path, 
    File "C:\Users\johndoe\AppData\Local\conda\conda\envs\tensorflowspyder\lib\site-packages\pip\req\req_set.py", line 784, in install 
    **kwargs 
    File "C:\Users\johndoe\AppData\Local\conda\conda\envs\tensorflowspyder\lib\site-packages\pip\req\req_install.py", line 851, in install 
    self.move_wheel_files(self.source_dir, root=root, prefix=prefix) 
    File "C:\Users\johndoe\AppData\Local\conda\conda\envs\tensorflowspyder\lib\site-packages\pip\req\req_install.py", line 1064, in move_wheel_files 
    isolated=self.isolated, 
    File "C:\Users\johndoe\AppData\Local\conda\conda\envs\tensorflowspyder\lib\site-packages\pip\wheel.py", line 247, in move_wheel_files 
    prefix=prefix, 
    File "C:\Users\johndoe\AppData\Local\conda\conda\envs\tensorflowspyder\lib\site-packages\pip\locations.py", line 140, in distutils_scheme 
    d = Distribution(dist_args) 
    File "C:\Users\johndoe\AppData\Local\conda\conda\envs\tensorflowspyder\lib\site-packages\setuptools\dist.py", line 365, in __init__ 
    self._finalize_requires() 
    File "C:\Users\johndoe\AppData\Local\conda\conda\envs\tensorflowspyder\lib\site-packages\setuptools\dist.py", line 372, in _finalize_requires 
    if not self.install_requires: 
AttributeError: 'Distribution' object has no attribute 'install_requires' 

meine Version ist immer noch die gleiche

---------------- update2 ---------------------- ------------ lief ich den gleichen Befehl wieder und bekam folgende Meldung

>pip install tensorflow --upgrade 
Collecting tensorflow 
    Using cached tensorflow-1.3.0-cp35-cp35m-win_amd64.whl 
Collecting tensorflow-tensorboard<0.2.0,>=0.1.0 (from tensorflow) 
    Using cached tensorflow_tensorboard-0.1.8-py3-none-any.whl 
Requirement already up-to-date: numpy>=1.11.0 in c:\users\johndoe\appdata\local\conda\conda\envs\tensorflowspyder\lib\site-packages (from tensorflow) 
Collecting protobuf>=3.3.0 (from tensorflow) 
    Using cached protobuf-3.4.0-py2.py3-none-any.whl 
Requirement already up-to-date: six>=1.10.0 in c:\users\johndoe\appdata\local\conda\conda\envs\tensorflowspyder\lib\site-packages (from tensorflow) 
Collecting wheel>=0.26 (from tensorflow) 
    Using cached wheel-0.30.0-py2.py3-none-any.whl 
Requirement already up-to-date: html5lib==0.9999999 in c:\users\johndoe\appdata\local\conda\conda\envs\tensorflowspyder\lib\site-packages (from tensorflow-tensorboard<0.2.0,>=0.1.0->tensorflow) 
Collecting markdown>=2.6.8 (from tensorflow-tensorboard<0.2.0,>=0.1.0->tensorflow) 
Requirement already up-to-date: bleach==1.5.0 in c:\users\johndoe\appdata\local\conda\conda\envs\tensorflowspyder\lib\site-packages (from tensorflow-tensorboard<0.2.0,>=0.1.0->tensorflow) 
Requirement already up-to-date: werkzeug>=0.11.10 in c:\users\johndoe\appdata\local\conda\conda\envs\tensorflowspyder\lib\site-packages (from tensorflow-tensorboard<0.2.0,>=0.1.0->tensorflow) 
Collecting setuptools (from protobuf>=3.3.0->tensorflow) 
    Using cached setuptools-36.6.0-py2.py3-none-any.whl 
Installing collected packages: setuptools, protobuf, markdown, wheel, tensorflow-tensorboard, tensorflow 
    Found existing installation: setuptools 36.2.0 
    Uninstalling setuptools-36.2.0: 
     Successfully uninstalled setuptools-36.2.0 
    Found existing installation: protobuf 3.3.0 
    Uninstalling protobuf-3.3.0: 
     Successfully uninstalled protobuf-3.3.0 
    Found existing installation: Markdown 2.6.8 
    Uninstalling Markdown-2.6.8: 
     Successfully uninstalled Markdown-2.6.8 
    Found existing installation: wheel 0.29.0 
    Uninstalling wheel-0.29.0: 
     Successfully uninstalled wheel-0.29.0 
    Found existing installation: tensorflow 1.2.1 
    Uninstalling tensorflow-1.2.1: 
     Successfully uninstalled tensorflow-1.2.1 
Successfully installed markdown-2.6.9 protobuf-3.4.0 setuptools-36.6.0 tensorflow-1.3.0 tensorflow-tensorboard-0.1.8 wheel-0.30.0 

i geprüft und es scheint, dass tensorflow Version

tf.VERSION 
Out[2]: '1.3.0' 

Antwort

2

es Upgrade-Upgrade wurde wie ein normales Paket:

Wenn Tensorflow ist in einer Conda Umgebung installiert

activate your-conda-environment 

dann:

pip install pip --upgrade 
pip install tensorflow --upgrade 

Das ist für mich gerade gearbeitet.

+0

Ich versuchte und bekam die Nachricht 'AttributeError: 'Distribution' Objekt hat kein Attribut 'install_requires''. Ich habe die Detailnachricht an die aktualisierte Frage angehängt – user2543622

+0

Funktioniert auch mit der Standard-Conda-Umgebung, muss nur die Eingabeaufforderung als Admin ausführen. – koonyook