【发布时间】:2020-09-07 15:07:41
【问题描述】:
我最初在下载 tensorflow 时遇到了麻烦。终于可以做到了,但是现在我在虚拟环境中测试它,我收到了这个错误:
Traceback (most recent call last):
File "C:\Users\angel\AppData\Roaming\Python\Python38\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "C:\Users\angel\AppData\Roaming\Python\Python38\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "C:\Users\angel\AppData\Roaming\Python\Python38\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:\program files (x86)\python38-32\lib\imp.py", line 242, in load_module
return load_dynamic(name, filename, file)
File "c:\program files (x86)\python38-32\lib\imp.py", line 342, in load_dynamic
return _load(spec)
ImportError: DLL load failed while importing _pywrap_tensorflow_internal: Not enough memory resources are available to process this command.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\angel\AppData\Roaming\Python\Python38\site-packages\tensorflow\__init__.py", line 41, in <module>
from tensorflow.python.tools import module_util as _module_util
File "C:\Users\angel\AppData\Roaming\Python\Python38\site-packages\tensorflow\python\__init__.py", line 50, in <module>
from tensorflow.python import pywrap_tensorflow
File "C:\Users\angel\AppData\Roaming\Python\Python38\site-packages\tensorflow\python\pywrap_tensorflow.py", line 69, in <module>
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "C:\Users\angel\AppData\Roaming\Python\Python38\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "C:\Users\angel\AppData\Roaming\Python\Python38\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "C:\Users\angel\AppData\Roaming\Python\Python38\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:\program files (x86)\python38-32\lib\imp.py", line 242, in load_module
return load_dynamic(name, filename, file)
File "c:\program files (x86)\python38-32\lib\imp.py", line 342, in load_dynamic
return _load(spec)
ImportError: DLL load failed while importing _pywrap_tensorflow_internal: Not enough memory resources are available to process this command.
我之前执行的命令应该验证我是否安装了它,我看到它安装了。我什至升级了它以确保。在网站上虽然它告诉我把这个命令放在:
python -c "import tensorflow as tf;print(tf.reduce_sum(tf.random.normal([1000, 1000])))"
我不确定为什么会出现错误。我刚开始做 ML,但实际下载/验证下载是一件痛苦的事。我查看了他们的网站,但他们没有在此处列出此错误。想知道我是否可以从社区获得帮助。
【问题讨论】:
-
你的虚拟环境有足够的内存吗?
-
python38-32? TensorFlow 需要 64 位 Python。 -
塞尔丘克,我不知道如何检查。
-
已安装 64 位。我不知道为什么它使用 32 位,phd
标签: python tensorflow pip installation python-venv