我使用StackOverflow上的this链接安装了tensorflow。
但是,当我尝试运行代码时,出现以下错误
这是我系统的信息
(env) PS C:\SD\project> python --version
Python 3.7.3
(env) PS C:\SD\AnomalyDetectionCVPR2018> pip3 --version
pip 19.1.1 from c:\sd\env\lib\site-packages\pip (python 3.7)
我得到的错误:
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\SD\env\lib\site-packages\tensorflow\python\__init__.py", line 66, in <module>
from tensorflow.python import pywrap_tensorflow
File "C:\SD\env\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 28, in <module>
_pywrap_tensorflow = swig_import_helper()
File "C:\SD\env\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.
See https://github.com/tensorflow/tensorflow/blob/master/tensorflow/g3doc/get_started/os_setup.md#import_error
我在做什么错?到目前为止,我使用Python和pip都没有问题。
答案 0 :(得分:0)
尝试为Linux安装Anaconda3-4.4.0-Windows-x86_64
或Anaconda3-4.4.0-Linux-x86_64.sh
,此版本于2017-05-26发布。
然后尝试安装tensorflow,matplotlib,pandas,numpy但在运行之前
conda update conda
更新anaconda的某些软件包。而且您将毫无问题地安装这些软件包/库, 最好的问候