我已经看到并实施了一些解决我的问题的潜在方案,但似乎都不起作用。 我可以解决导入tensorflow时的错误吗
版本 -->;python 3.7.4 -->;tensorflow 2.3.0
runfile('C:/Users/pshad/.spyder-py3/temp.py', wdir='C:/Users/pshad/.spyder-py3') Traceback (most recent call last):
File "<ipython-input-27-bc8fb4f78acd>", line 1, in <module>
runfile('C:/Users/pshad/.spyder-py3/temp.py', wdir='C:/Users/pshad/.spyder-py3')
File "C:\Users\pshad\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 827, in runfile
execfile(filename, namespace)
File "C:\Users\pshad\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 110, in execfile
exec(compile(f.read(), filename, 'exec'), namespace)
File "C:/Users/pshad/.spyder-py3/temp.py", line 9, in <module>
import tensorflow as tf
File "C:\Users\pshad\Anaconda3\lib\site-packages\tensorflow\__init__.py", line 41, in <module>
from tensorflow.python.tools import module_util as _module_util
File "C:\Users\pshad\Anaconda3\lib\site-packages\tensorflow\python\__init__.py", line 40, in <module>
from tensorflow.python.eager import context
File "C:\Users\pshad\Anaconda3\lib\site-packages\tensorflow\python\eager\context.py", line 35, in <module>
from tensorflow.python import pywrap_tfe
File "C:\Users\pshad\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tfe.py", line 28, in <module>
from tensorflow.python import pywrap_tensorflow
File "C:\Users\pshad\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 83, in <module>
raise ImportError(msg)
ImportError: Traceback (most recent call last): File "C:\Users\pshad\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 64, in <module>
from tensorflow.python._pywrap_tensorflow_internal import * ImportError: DLL load failed: The specified module could not be found.
Failed to load the native TensorFlow runtime.
我认为软件包安装不正确。尝试重新安装。(如果使用“pip”安装,请不要忘记更新它)
Anaconda为Tensorflow提供了一个安装,它负责所有事情,包括所有GPU和CUDA依赖项:
它适用于Tensorflow 2.1和Python 3.7。当组件单独安装或通过Anaconda以外的其他通道安装时,DLL故障很常见
相关问题 更多 >
编程相关推荐