【问题标题】:tensorflow "Not enough memory resources are available to process this command". What does this mean? - Python v3.8tensorflow“没有足够的内存资源来处理这个命令”。这是什么意思? - Python v3.8
【发布时间】: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


【解决方案1】:

此链接可能会阐明您的问题: https://github.com/opencv/opencv-python/issues/36

我知道它适用于 opencv,但它可能适用于您的问题。我看到了 Tensorflow,所以我假设您可能正在使用 Anaconda 来利用 GPU?如果是这样,那么该链接将告诉您需要将 python3.dll 文件复制到您的 Anaconda3 安装所在的位置。

【讨论】:

    猜你喜欢
    • 2021-12-17
    • 2021-09-30
    • 1970-01-01
    • 2010-10-07
    • 2018-08-30
    • 2014-01-24
    • 1970-01-01
    • 2010-10-28
    • 1970-01-01
    相关资源
    最近更新 更多