tensorflow没正确安装导致无法 import tensorflow under python
错误信息如下:
import tensorflow as tf
Traceback (most recent call last):
File "", line 1, in
ImportError: No module named tensorflow
解决方法:
$ conda install virtualenv # suggested by the output of terminal not using pip install
$ conda create --name=tensorflow_env python=2.7
$ source activate tensorflow_env
$ pip install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.5.0-cp27-none-linux_x86_64.whl
参考资料:
https://github.com/tensorflow/tensorflow
https://github.com/tensorflow/tensorflow/issues/647
https://www.scivision.co/install-cuda-accelerate-for-anaconda-python/
https://www.tensorflow.org/install/install_linux#the_url_of_the_tensorflow_python_package