Importing issue with tensorflow in Python 3.5.3

人走茶凉 提交于 2020-01-06 05:42:25

问题


When I import tensorflow in Python 3.5.3, it gives me following:

ERROR:

No module named _pywrap_tensorflow

Unless you are using bazel, you should not try to import tensorflow from its source directory; please exit the tensorflow source tree, and relaunch your python interpreter from there.

I installed tensorflow-0.12.0 using the following command:

python -m pip install --upgrade
https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-0.12.0-py3-none-any.whl


回答1:


Make sure that Python 3.5.3 is supported for Tensorflow, then install Microsoft Visual C++ 2015 Redistributable and try this command (note that you also need to uninstall the current Tensorflow first):

python -m pip install --upgrade  https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow-0.12.1-cp35-cp35m-win_amd64.whl

Update: Go to https://pypi.python.org/pypi/tensorflow to check for available built that works for you.



来源:https://stackoverflow.com/questions/49610858/importing-issue-with-tensorflow-in-python-3-5-3

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!