ImportError:没有名为' tensorflow'

时间:2017-04-16 15:09:54

标签: 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'
>>>

1 个答案:

答案 0 :(得分:0)

好的我必须删除

中的tensorflow文件夹
C:\Users\Upstairs\AppData\Local\Programs\Python\Python35\Lib\site-packages 

然后:

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