2017-04-16 98 views
0

這是在那裏了很多,但我似乎無法找到我的具體情況,我認爲這是安裝tensorflow但它不進口:導入錯誤:沒有模塊名爲「tensorflow」

C:\Users\Upstairs\AppData\Local\Programs\Python\Python35\Scripts>pip3 install --upgrade tensorflow 
Requirement already up-to-date: tensorflow in c:\users\upstairs\appdata\local\programs\python\python35\lib\site-packages 
Requirement already up-to-date: wheel>=0.26 in c:\users\upstairs\appdata\local\programs\python\python35\lib\site-packages (from tensorflow) 
Requirement already up-to-date: protobuf>=3.1.0 in c:\users\upstairs\appdata\local\programs\python\python35\lib\site-packages (from tensorflow) 
Requirement already up-to-date: six>=1.10.0 in c:\users\upstairs\appdata\local\programs\python\python35\lib\site-packages (from tensorflow) 
Requirement already up-to-date: numpy>=1.11.0 in c:\users\upstairs\appdata\local\programs\python\python35\lib\site-packages (from tensorflow) 
Requirement already up-to-date: setuptools in c:\users\upstairs\appdata\local\programs\python\python35\lib\site-packages (from protobuf>=3.1.0->tensorflow) 
Requirement already up-to-date: packaging>=16.8 in c:\users\upstairs\appdata\local\programs\python\python35\lib\site-packages (from setuptools->protobuf>=3.1.0->tensorflow) 
Requirement already up-to-date: appdirs>=1.4.0 in c:\users\upstairs\appdata\local\programs\python\python35\lib\site-packages (from setuptools->protobuf>=3.1.0->tensorflow) 
Requirement already up-to-date: pyparsing in c:\users\upstairs\appdata\local\programs\python\python35\lib\site-packages (from packaging>=16.8->setuptools->protobuf>=3.1.0->tensorflow) 
You are using pip version 8.1.1, however version 9.0.1 is available. 
You should consider upgrading via the 'python -m pip install --upgrade pip' command. 

C:\Users\Upstairs\AppData\Local\Programs\Python\Python35\Scripts>cd.. 

C:\Users\Upstairs\AppData\Local\Programs\Python\Python35>python 
Python 3.5.2 (v3.5.2:4def2a2901a5, Jun 25 2016, 22:18:55) [MSC v.1900 64 bit (AMD64)] on win32 
Type "help", "copyright", "credits" or "license" for more information. 
>>> import tensorflow as tf 
Traceback (most recent call last): 
    File "<stdin>", line 1, in <module> 
ImportError: No module named 'tensorflow' 
>>> 
+0

爲什麼不升級點數? – dv3

+0

我試過了,它不更新。那好吧,因爲它是在做python2.7,更新點數爲3.5。 張量流的確切結果相同 – Scalextrix

+0

這可能來自您的兩個Python安裝之間的衝突。你能否嘗試徹底卸載TF並確保隔離它的Python 3.5安裝? – Adriano

回答

0

OK,我不得不刪除在

C:\Users\Upstairs\AppData\Local\Programs\Python\Python35\Lib\site-packages 

然後tensorflow文件夾:

C:\Users\Upstairs\AppData\Local\Programs\Python\Python35\Scripts>pip3 install --upgrade tensorflow 
相關問題