我正在使用pycharm编辑器和python 3.7。我使用命令安装了Tensor流
pip install --upgrade https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow-1.0.0-cp35-cp35m-win_amd64.whl
在执行以下代码时
import tensorflow as tf
Error:
C:\Users\suksengupta\PycharmProjects\Project_July2019\venv\Scripts\python.exe C:/Users/suksengupta/PycharmProjects/Project_July2019/Sklearn/Tensorflow.py
Traceback (most recent call last):
File "C:\Users\suksengupta\PycharmProjects\Project_July2019\venv\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 18, in swig_import_helper
fp, pathname, description = imp.find_module('_pywrap_tensorflow', [dirname(__file__)])
File "C:\Users\suksengupta\AppData\Local\Programs\Python\Python37-32\lib\imp.py", line 296, in find_module
raise ImportError(_ERR_MSG.format(name), name=name)
ImportError: No module named '_pywrap_tensorflow'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\suksengupta\PycharmProjects\Project_July2019\venv\lib\site-packages\tensorflow\python\__init__.py", line 66, in <module>
from tensorflow.python import pywrap_tensorflow
File "C:\Users\suksengupta\PycharmProjects\Project_July2019\venv\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 28, in <module>
_pywrap_tensorflow = swig_import_helper()
File "C:\Users\suksengupta\PycharmProjects\Project_July2019\venv\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 20, in swig_import_helper
import _pywrap_tensorflow
ModuleNotFoundError: No module named '_pywrap_tensorflow'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:/Users/suksengupta/PycharmProjects/Project_July2019/Sklearn/Tensorflow.py", line 1, in <module>
import tensorflow as tf
File "C:\Users\suksengupta\PycharmProjects\Project_July2019\venv\lib\site-packages\tensorflow\__init__.py", line 24, in <module>
from tensorflow.python import *
File "C:\Users\suksengupta\PycharmProjects\Project_July2019\venv\lib\site-packages\tensorflow\python\__init__.py", line 72, in <module>
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "C:\Users\suksengupta\PycharmProjects\Project_July2019\venv\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 18, in swig_import_helper
fp, pathname, description = imp.find_module('_pywrap_tensorflow', [dirname(__file__)])
File "C:\Users\suksengupta\AppData\Local\Programs\Python\Python37-32\lib\imp.py", line 296, in find_module
raise ImportError(_ERR_MSG.format(name), name=name)
ImportError: No module named '_pywrap_tensorflow'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\suksengupta\PycharmProjects\Project_July2019\venv\lib\site-packages\tensorflow\python\__init__.py", line 66, in <module>
from tensorflow.python import pywrap_tensorflow
File "C:\Users\suksengupta\PycharmProjects\Project_July2019\venv\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 28, in <module>
_pywrap_tensorflow = swig_import_helper()
File "C:\Users\suksengupta\PycharmProjects\Project_July2019\venv\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 20, in swig_import_helper
import _pywrap_tensorflow
ModuleNotFoundError: No module named '_pywrap_tensorflow'
Failed to load the native TensorFlow runtime.
出于某些常见原因和解决方案。包括整个堆栈跟踪 寻求帮助时,此错误消息上方。
以退出代码1完成的过程
我收到此错误是因为Python 3.7版本吗?