我一直在用笔记本电脑(今年早些时候购买的相对低端的戴尔商务笔记本电脑)为大学做一些数据科学工作,并且在使Tensorflow正常工作方面遇到了一些困难。
(可能)笔记本电脑的CPU不兼容AVX,并且图形卡是板载Intel卡,而不是Nvidia卡,所以我没有安装CUDA,因为它肯定是 兼容。
我遇到了以下错误:
C:\Users\nicho\AppData\Local\Programs\Python\Python37\python.exe C:/Users/nicho/Documents/example.py
Traceback (most recent call last):
File "C:\Users\nicho\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow_core\python\pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "C:\Users\nicho\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow_core\python\pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "C:\Users\nicho\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow_core\python\pywrap_tensorflow_internal.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
File "C:\Users\nicho\AppData\Local\Programs\Python\Python37\lib\imp.py", line 242, in load_module
return load_dynamic(name, filename, file)
File "C:\Users\nicho\AppData\Local\Programs\Python\Python37\lib\imp.py", line 342, in load_dynamic
return _load(spec)
ImportError: DLL load failed: A dynamic link library (DLL) initialization routine failed.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:/Users/nicho/Documents/example.py", line 4, in <module>
import tensorflow as tf
File "C:\Users\nicho\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\__init__.py", line 98, in <module>
from tensorflow_core import *
File "C:\Users\nicho\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow_core\__init__.py", line 40, in <module>
from tensorflow.python.tools import module_util as _module_util
File "C:\Users\nicho\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\__init__.py", line 50, in __getattr__
module = self._load()
File "C:\Users\nicho\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\__init__.py", line 44, in _load
module = _importlib.import_module(self.__name__)
File "C:\Users\nicho\AppData\Local\Programs\Python\Python37\lib\importlib\__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "C:\Users\nicho\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow_core\python\__init__.py", line 49, in <module>
from tensorflow.python import pywrap_tensorflow
File "C:\Users\nicho\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow_core\python\pywrap_tensorflow.py", line 74, in <module>
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "C:\Users\nicho\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow_core\python\pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "C:\Users\nicho\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow_core\python\pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "C:\Users\nicho\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow_core\python\pywrap_tensorflow_internal.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
File "C:\Users\nicho\AppData\Local\Programs\Python\Python37\lib\imp.py", line 242, in load_module
return load_dynamic(name, filename, file)
File "C:\Users\nicho\AppData\Local\Programs\Python\Python37\lib\imp.py", line 342, in load_dynamic
return _load(spec)
ImportError: DLL load failed: A dynamic link library (DLL) initialization routine failed.
Failed to load the native TensorFlow runtime.
See https://www.tensorflow.org/install/errors
for some common reasons and solutions. Include the entire stack trace
above this error message when asking for help.
Process finished with exit code 1
我已经进行了一些搜索,并且在Tensorflow网站上找到了this页,但是在那里发布的各种解决方案(包括官方的“解决方案”)对我都不起作用-我尝试安装Windows C ++ devkit,并且我尝试摆弄我的Python和Tensorflow版本。
我还在这里看到this的问题,该问题的答案表明问题出在我的笔记本电脑无法处理AVX指令,并建议使用Google的怪异云IDE Google Colab。我更希望使用真正的IDE在本地处理所有事情,尤其是因为我不确定我是否相信我的大学数据(例如,Google)我不知道他们是否会将信息从这些信息提供给他们的广告算法。
我真的不想花很多钱购买仅用于Tensorflow项目的功能强大的游戏笔记本电脑。有什么方法可以让Tensorflow在笔记本电脑上工作吗?除了Google的怪异(甚至可能不可信)的云IDE,我还有其他选择吗?