安装仅限Tensorflow CPU的Windows 8.1 Python 3.5.2时出错
安装仅限Tensorflow CPU的Windows 8.1 Python 3.5.2时出错,python,tensorflow,Python,Tensorflow,在安装tensorflow后尝试导入它时,出现以下错误。 我所做的: 1.pip安装--升级tensorflow 2.Python版本是3.5.2 3.我只想安装CPU tensorflow。 4.操作系统是Windows 8.1 >>> import tensorflow Traceback (most recent call last): File "C:\Users\Student\AppData\Local\Programs\Python\Pytho
在安装tensorflow后尝试导入它时,出现以下错误。
我所做的:
1.pip安装--升级tensorflow
2.Python版本是3.5.2
3.我只想安装CPU tensorflow。
4.操作系统是Windows 8.1
>>> import tensorflow
Traceback (most recent call last):
File "C:\Users\Student\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 18, in swig_import_helper
return importlib.import_module(mname)
File "C:\Users\Student\AppData\Local\Programs\Python\Python35\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 986, in _gcd_import
File "<frozen importlib._bootstrap>", line 969, in _find_and_load
File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 666, in _load_unlocked
File "<frozen importlib._bootstrap>", line 577, in module_from_spec
File "<frozen importlib._bootstrap_external>", line 906, in create_module
File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
ImportError: DLL load failed: The specified module could not be found.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\Student\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 41, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "C:\Program Files\JetBrains\PyCharm 2017.1.1\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 21, in do_import
module = self._system_import(name, *args, **kwargs)
File "C:\Users\Student\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 21, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "C:\Users\Student\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 20, in swig_import_helper
return importlib.import_module('_pywrap_tensorflow_internal')
File "C:\Users\Student\AppData\Local\Programs\Python\Python35\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ImportError: No module named '_pywrap_tensorflow_internal'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "C:\Program Files\JetBrains\PyCharm 2017.1.1\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 21, in do_import
module = self._system_import(name, *args, **kwargs)
File "C:\Users\Student\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\__init__.py", line 24, in <module>
from tensorflow.python import *
File "C:\Program Files\JetBrains\PyCharm 2017.1.1\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 21, in do_import
module = self._system_import(name, *args, **kwargs)
File "C:\Users\Student\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\__init__.py", line 49, in <module>
from tensorflow.python import pywrap_tensorflow
File "C:\Program Files\JetBrains\PyCharm 2017.1.1\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 21, in do_import
module = self._system_import(name, *args, **kwargs)
File "C:\Program Files\JetBrains\PyCharm 2017.1.1\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 21, in do_import
module = self._system_import(name, *args, **kwargs)
File "C:\Users\Student\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 52, in <module>
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "C:\Users\Student\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 18, in swig_import_helper
return importlib.import_module(mname)
File "C:\Users\Student\AppData\Local\Programs\Python\Python35\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 986, in _gcd_import
File "<frozen importlib._bootstrap>", line 969, in _find_and_load
File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 666, in _load_unlocked
File "<frozen importlib._bootstrap>", line 577, in module_from_spec
File "<frozen importlib._bootstrap_external>", line 906, in create_module
File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
ImportError: DLL load failed: The specified module could not be found.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\Student\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 41, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "C:\Program Files\JetBrains\PyCharm 2017.1.1\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 21, in do_import
module = self._system_import(name, *args, **kwargs)
File "C:\Users\Student\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 21, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "C:\Users\Student\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 20, in swig_import_helper
return importlib.import_module('_pywrap_tensorflow_internal')
File "C:\Users\Student\AppData\Local\Programs\Python\Python35\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ImportError: No module named '_pywrap_tensorflow_internal'
Failed to load the native TensorFlow runtime.
See https://www.tensorflow.org/install/install_sources#common_installation_problems
for some common reasons and solutions. Include the entire stack trace
导入tensorflow
回溯(最近一次呼叫最后一次):
swig\u import\u helper中的文件“C:\Users\Student\AppData\Local\Programs\Python35\lib\site packages\tensorflow\Python\pywrap\u tensorflow\u internal.py”第18行
返回导入lib.import\u模块(mname)
文件“C:\Users\Student\AppData\Local\Programs\Python\35\lib\importlib\\uuuu init\uuuu.py”,第126行,在导入模块中
return _bootstrap._gcd_import(名称[级别:],包,级别)
文件“”,第986行,在_gcd_import中
文件“”,第969行,在“查找”和“加载”中
文件“”,第958行,在“查找”和“加载”中解锁
文件“”,第666行,在“加载”中
文件“”,第577行,位于\u规范的模块\u中
文件“”,第906行,在创建_模块中
文件“”,第222行,在已删除帧的调用中
ImportError:DLL加载失败:找不到指定的模块。
在处理上述异常期间,发生了另一个异常:
回溯(最近一次呼叫最后一次):
文件“C:\Users\Student\AppData\Local\Programs\Python\35\lib\site packages\tensorflow\Python\pywrap\u tensorflow.py”,第41行,在
从tensorflow.python.pywrap\u tensorflow\u内部导入*
文件“C:\Program Files\JetBrains\PyCharm 2017.1.1\helpers\pydev\\u pydev\u bundle\pydev\u import\u hook.py”,第21行,在do\u import中
模块=self.\u系统\u导入(名称,*args,**kwargs)
文件“C:\Users\Student\AppData\Local\Programs\Python\35\lib\site packages\tensorflow\Python\pywrap\u tensorflow\u internal.py”,第21行,在
_pywrap\u tensorflow\u internal=swig\u import\u helper()
文件“C:\Users\Student\AppData\Local\Programs\Python\35\lib\site packages\tensorflow\Python\pywrap\u tensorflow\u internal.py”,第20行,在swig\u import\u helper中
返回importlib.import\u模块(“pywrap\u tensorflow\u internal”)
文件“C:\Users\Student\AppData\Local\Programs\Python\35\lib\importlib\\uuuu init\uuuu.py”,第126行,在导入模块中
return _bootstrap._gcd_import(名称[级别:],包,级别)
ImportError:没有名为“\u pywrap\u tensorflow\u internal”的模块
在处理上述异常期间,发生了另一个异常:
回溯(最近一次呼叫最后一次):
文件“”,第1行,在
文件“C:\Program Files\JetBrains\PyCharm 2017.1.1\helpers\pydev\\u pydev\u bundle\pydev\u import\u hook.py”,第21行,在do\u import中
模块=self.\u系统\u导入(名称,*args,**kwargs)
文件“C:\Users\Student\AppData\Local\Programs\Python\35\lib\site packages\tensorflow\ \uuuuu init\uuuuu.py”,第24行,在
从tensorflow.python导入*
文件“C:\Program Files\JetBrains\PyCharm 2017.1.1\helpers\pydev\\u pydev\u bundle\pydev\u import\u hook.py”,第21行,在do\u import中
模块=self.\u系统\u导入(名称,*args,**kwargs)
文件“C:\Users\Student\AppData\Local\Programs\Python\35\lib\site packages\tensorflow\Python\\uuuu init\uuu.py”,第49行,在
从tensorflow.python导入pywrap\u tensorflow
文件“C:\Program Files\JetBrains\PyCharm 2017.1.1\helpers\pydev\\u pydev\u bundle\pydev\u import\u hook.py”,第21行,在do\u import中
模块=self.\u系统\u导入(名称,*args,**kwargs)
文件“C:\Program Files\JetBrains\PyCharm 2017.1.1\helpers\pydev\\u pydev\u bundle\pydev\u import\u hook.py”,第21行,在do\u import中
模块=self.\u系统\u导入(名称,*args,**kwargs)
文件“C:\Users\Student\AppData\Local\Programs\Python\35\lib\site packages\tensorflow\Python\pywrap\u tensorflow.py”,第52行,在
提高效率(msg)
ImportError:回溯(最近一次呼叫上次):
swig\u import\u helper中的文件“C:\Users\Student\AppData\Local\Programs\Python35\lib\site packages\tensorflow\Python\pywrap\u tensorflow\u internal.py”第18行
返回导入lib.import\u模块(mname)
文件“C:\Users\Student\AppData\Local\Programs\Python\35\lib\importlib\\uuuu init\uuuu.py”,第126行,在导入模块中
return _bootstrap._gcd_import(名称[级别:],包,级别)
文件“”,第986行,在_gcd_import中
文件“”,第969行,在“查找”和“加载”中
文件“”,第958行,在“查找”和“加载”中解锁
文件“”,第666行,在“加载”中
文件“”,第577行,位于\u规范的模块\u中
文件“”,第906行,在创建_模块中
文件“”,第222行,在已删除帧的调用中
ImportError:DLL加载失败:找不到指定的模块。
在处理上述异常期间,发生了另一个异常:
回溯(最近一次呼叫最后一次):
文件“C:\Users\Student\AppData\Local\Programs\Python\35\lib\site packages\tensorflow\Python\pywrap\u tensorflow.py”,第41行,在
从tensorflow.python.pywrap\u tensorflow\u内部导入*
文件“C:\Program Files\JetBrains\PyCharm 2017.1.1\helpers\pydev\\u pydev\u bundle\pydev\u import\u hook.py”,第21行,在do\u import中
模块=self.\u系统\u导入(名称,*args,**kwargs)
文件“C:\Users\Student\AppData\Local\Programs\Python\35\lib\site packages\tensorflow\Python\pywrap\u tensorflow\u internal.py”,第21行,在
_pywrap\u tensorflow\u internal=swig\u import\u helper()
文件“C:\Users\Student\AppData\Local\Programs\Python\35\lib\site packages\tensorflow\Python\pywrap\u tensorflow\u internal.py”,第20行,在swig\u import\u helper中
返回importlib.import\u模块(“pywrap\u tensorflow\u internal”)
文件“C:\Users\Student\AppData\Local\Programs\Python\35\lib\importlib\\uuuu init\uuuu.py”,第126行,在导入模块中
return _bootstrap._gcd_import(名称[级别:],包,级别)
ImportError:没有名为“\u pywrap\u tensorflow\u internal”的模块
未能加载本机TensorFlow运行时。
看见https://www.tensorflow.org/install/install_sources#common_installation_probl