簡體   English   中英

TensorFlow 錯誤:ImportError: DLL 在 Python3.8 中導入 _pywrap_tensorflow_internal 時加載失敗,錯誤代碼為 3221225501

[英]TensorFlow Error: ImportError: DLL load failed with error code 3221225501 while importing _pywrap_ tensorflow_internal in Python3.8

在導入 TensorFlow 時如何解決此錯誤:

  1. Python 3.8.4。
  2. Windows 7 終極 64 位。
  3. 2GB 內存。
  4. 英特爾(R) 賽揚(R) CPU N2840 @ 2.16GHz。
  5. 英特爾(R) 高清顯卡。
>>> import tensorflow as tf
Traceback (most recent call last):
  File "G:\Users\Abdo-Prgraming\AppData\Roaming\Python\Python38\site-packages\te
nsorflow\python\pywrap_tensorflow.py", line 64, in <module>
    from tensorflow.python._pywrap_tensorflow_internal import *
ImportError: DLL load failed with error code 3221225501 while importing _pywrap_
tensorflow_internal

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "G:\Users\Abdo-Prgraming\AppData\Roaming\Python\Python38\site-packages\tensorflow\__init__.py", line 41, in <module>
    from tensorflow.python.tools import module_util as _module_util
  File "G:\Users\Abdo-Prgraming\AppData\Roaming\Python\Python38\site-packages\tensorflow\python\__init__.py", line 40, in <module>
    from tensorflow.python.eager import context
  File "G:\Users\Abdo-Prgraming\AppData\Roaming\Python\Python38\site-packages\tensorflow\python\eager\context.py", line 35, in <module>
    from tensorflow.python import pywrap_tfe
  File "G:\Users\Abdo-Prgraming\AppData\Roaming\Python\Python38\site-packages\tensorflow\python\pywrap_tfe.py", line 28, in <module>
    from tensorflow.python import pywrap_tensorflow
  File "G:\Users\Abdo-Prgraming\AppData\Roaming\Python\Python38\site-packages\tensorflow\python\pywrap_tensorflow.py", line 83, in <module>
    raise ImportError(msg)
ImportError: Traceback (most recent call last):
  File "G:\Users\Abdo-Prgraming\AppData\Roaming\Python\Python38\site-packages\tensorflow\python\pywrap_tensorflow.py", line 64, in <module>
    from tensorflow.python._pywrap_tensorflow_internal import *
ImportError: DLL load failed with error code 3221225501 while importing _pywrap_tensorflow_internal


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.

我遇到了類似的問題,我的解決方案是通過 Anaconda 虛擬環境安裝 tensorflow。

從他們的官方網站安裝 Anaconda 並創建虛擬環境並打開 Anaconda 提示然后...

conda create -n name_of_the_env
conda activate name_of_the_env
conda install tensorflow

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM