2016-04-27 79 views
0

我已經使用pip成功安裝了tensorflow。我有python 2.7.11。當我做了pip show tensorflow,這表明我已經成功安裝了tensorflow 0.8.0版本。無法導入張量流程

但測試安裝我做

$python 
import tensorflow as tf 

然後我得到

Traceback (most recent call last): 
File "<stdin>", line 1, in <module> 
ImportError: No module named tensorflow 

當我做$畫中畫顯示tensorflow我得到這個

Metadata-Version: 2.0 
Name: tensorflow 
Version: 0.8.0 
Summary: TensorFlow helps the tensors flow 
Home-page: http://tensorflow.org/ 
Author: Google Inc. 
Author-email: [email protected] 
Installer: pip 
License: Apache 2.0 
Location: /usr/local/lib/python2.7/dist-packages 
Requires: six, protobuf, wheel, numpy 
Classifiers: 
Development Status :: 4 - Beta 
Intended Audience :: Developers 
Intended Audience :: Education 
Intended Audience :: Science/Research 
License :: OSI Approved :: Apache Software License 
Programming Language :: Python :: 2.7 
Topic :: Scientific/Engineering :: Mathematics 
Topic :: Software Development :: Libraries :: Python Modules 
Topic :: Software Development :: Libraries 
Entry-points: 
[console_scripts] 
tensorboard = tensorflow.tensorboard.tensorboard:main 
+1

是什麼'PIP顯示tensorflow'實際打印?怎麼樣'python -c'導入sys;打印(sys.path)'? –

回答

0

確定當你調用python解釋器版本2.7是默認的? 嘗試鍵入您的外殼

python -V 

確認哪個版本是默認值。如果不是2.7,嘗試類型

python2.7 -c "import tensorflow as tf" 

,看看你得到任何錯誤