[英]I installed tensorflow and tensorflow_gpu on my Windows 10 64-bit OS with PyCharm and Python 3.7.2. But i get these errors while using tensorflow
Traceback (most recent call last): File "C:\\Users\\sai kushal\\PycharmProjects\\live\\venv\\lib\\site-packages\\tensorflow\\python\\pywrap_tensorflow.py", line 58, in from tensorflow.python.pywrap_tensorflow_internal import * File "C:\\Users\\sai kushal\\PycharmProjects\\live\\venv\\lib\\site-packages\\tensorflow\\python\\pywrap_tensorflow_internal.py", line 28, in _pywrap_tensorflow_internal = swig_import_helper() File "C:\\Users\\sai kushal\\PycharmProjects\\live\\venv\\lib\\site-packages\\tensorflow\\python\\pywrap_tensorflow_internal.py", line 24, in swig_import_helper _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description) File "C:\\Users\\sai kushal\\AppData\\Local\\Programs\\Python\\Python37\\lib\\imp.py", line 242, in load_module return load_dynamic(name, filename, file) File "C:\\Users\\sai kushal\\AppData\\Local\\Programs\\Python\\Python37\\lib\\imp.py", line 342, in load_dynamic return _load(spec) ImportError: DLL load failed: The specified module could not be found.
回溯(最近一次调用):文件“C:\\Users\\sai kushal\\PycharmProjects\\live\\venv\\lib\\site-packages\\tensorflow\\python\\pywrap_tensorflow.py”,第 58 行,来自 tensorflow.python.pywrap_tensorflow_internal import * 文件“C:\\Users\\sai kushal\\PycharmProjects\\live\\venv\\lib\\site-packages\\tensorflow\\python\\pywrap_tensorflow_internal.py”,第 28 行,在 _pywrap_tensorflow_internal = swig_import_helper() 文件“C:\\Users\\sai kushal \\PycharmProjects\\live\\venv\\lib\\site-packages\\tensorflow\\python\\pywrap_tensorflow_internal.py”,第 24 行,在 swig_import_helper _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description) 文件“C:\\Users\\ sai kushal\\AppData\\Local\\Programs\\Python\\Python37\\lib\\imp.py", line 242, in load_module return load_dynamic(name, filename, file) File "C:\\Users\\sai kushal\\AppData\\Local\\Programs\\ Python\\Python37\\lib\\imp.py", line 342, in load_dynamic return _load(spec) 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/sai kushal/PycharmProjects/live/testing_2.py", line 1, in import tensorflow as tf File "C:\\Users\\sai kushal\\PycharmProjects\\live\\venv\\lib\\site-packages\\tensorflow__init__.py", line 24, in from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import File "C:\\Users\\sai kushal\\PycharmProjects\\live\\venv\\lib\\site-packages\\tensorflow\\python__init__.py", line 49, in from tensorflow.python import pywrap_tensorflow File "C:\\Users\\sai kushal\\PycharmProjects\\live\\venv\\lib\\site-packages\\tensorflow\\python\\pywrap_tensorflow.py", line 74, in raise ImportError(msg) ImportError: Traceback (most recent call last): File "C:\\Users\\sai kushal\\PycharmProjects\\live\\venv\\lib\\site-packages\\tensorflow\\python\\pywrap_tensorflow.py", line 58, in from tensorflow.python.pywrap_tensorflow_internal import * File "C:\\Users\\sai kushal\\PycharmProjects\\live\\venv\\lib\\site-packages\\tensorflow\\python\\pywrap_tensorflow_internal.py", line 28, in _pywrap_tenso
回溯(最近一次通话):文件“C:/Users/sai kushal/PycharmProjects/live/testing_2.py”,第 1 行,导入 tensorflow 作为 tf 文件“C:\\Users\\sai kushal\\PycharmProjects\\live\\venv \\lib\\site-packages\\tensorflow__init__.py", line 24, in from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import File "C:\\Users\\sai kushal\\PycharmProjects\\live\\venv\\lib\\site-包\\tensorflow\\python__init__.py", line 49, in from tensorflow.python import pywrap_tensorflow File "C:\\Users\\sai kushal\\PycharmProjects\\live\\venv\\lib\\site-packages\\tensorflow\\python\\pywrap_tensorflow.py",第 74 行,在 raise ImportError(msg) ImportError: Traceback (last last call last): File "C:\\Users\\sai kushal\\PycharmProjects\\live\\venv\\lib\\site-packages\\tensorflow\\python\\pywrap_tensorflow.py",第 58 行,从 tensorflow.python.pywrap_tensorflow_internal 导入 * 文件“C:\\Users\\sai kushal\\PycharmProjects\\live\\venv\\lib\\site-packages\\tensorflow\\python\\pywrap_tensorflow_internal.py”,第 28 行,在 _pywrap_tenso rflow_internal = swig_import_helper() File "C:\\Users\\sai kushal\\PycharmProjects\\live\\venv\\lib\\site-packages\\tensorflow\\python\\pywrap_tensorflow_internal.py", line 24, in swig_import_helper _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description) File "C:\\Users\\sai kushal\\AppData\\Local\\Programs\\Python\\Python37\\lib\\imp.py", line 242, in load_module return load_dynamic(name, filename, file) File "C:\\Users\\sai kushal\\AppData\\Local\\Programs\\Python\\Python37\\lib\\imp.py", line 342, in load_dynamic return _load(spec) ImportError: DLL load failed: The specified module could not be found.
rflow_internal = swig_import_helper() 文件“C:\\Users\\sai kushal\\PycharmProjects\\live\\venv\\lib\\site-packages\\tensorflow\\python\\pywrap_tensorflow_internal.py”,第 24 行,在 swig_import_helper _mod = imp.load_module('_flow_pywrapternal , fp, pathname, description) File "C:\\Users\\sai kushal\\AppData\\Local\\Programs\\Python\\Python37\\lib\\imp.py", line 242, in load_module return load_dynamic(name, filename, file) File " C:\\Users\\sai kushal\\AppData\\Local\\Programs\\Python\\Python37\\lib\\imp.py”,第 342 行,在 load_dynamic 返回 _load(spec) ImportError: DLL load failed: The specified module could not be found.
Failed to load the native TensorFlow runtime.
无法加载本机 TensorFlow 运行时。
See https://www.tensorflow.org/install/errors for some common reasons and solutions.
有关一些常见原因和解决方案,请参阅https://www.tensorflow.org/install/errors 。 Include the entire stack trace above this error message when asking for help.
寻求帮助时,请在此错误消息上方包含整个堆栈跟踪。
Python 3.7 尚不支持 tensorflow,请改用 python 3.6,这应该可以修复此错误,如果不支持,请在下面发表评论。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.