[英]Unable to Find Tensorflow Module in Jupyter Notebooks Despite Being Installed
Been running in circles for a couple hours here.在这里转了几个小时。 Using Python 3 in Jupyter notebooks, tensorflow 2.3.1 is installed (confirmed by running pip freeze).
在 Jupyter 笔记本中使用 Python 3 安装 tensorflow 2.3.1(通过运行 pip freeze 确认)。
When I attempt to import tensorflow though:当我尝试导入 tensorflow 时:
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
~\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow.py in <module>
63 try:
---> 64 from tensorflow.python._pywrap_tensorflow_internal import *
65 # This try catch logic is because there is no bazel equivalent for py_extension.
ImportError: DLL load failed: The specified module could not be found.
During handling of the above exception, another exception occurred:
ImportError Traceback (most recent call last)
<ipython-input-16-d6579f534729> in <module>
----> 1 import tensorflow
~\Anaconda3\lib\site-packages\tensorflow\__init__.py in <module>
39 import sys as _sys
40
---> 41 from tensorflow.python.tools import module_util as _module_util
42 from tensorflow.python.util.lazy_loader import LazyLoader as _LazyLoader
43
~\Anaconda3\lib\site-packages\tensorflow\python\__init__.py in <module>
38 # pylint: disable=wildcard-import,g-bad-import-order,g-import-not-at-top
39
---> 40 from tensorflow.python.eager import context
41
42 # pylint: enable=wildcard-import
~\Anaconda3\lib\site-packages\tensorflow\python\eager\context.py in <module>
33 from tensorflow.core.protobuf import config_pb2
34 from tensorflow.core.protobuf import rewriter_config_pb2
---> 35 from tensorflow.python import pywrap_tfe
36 from tensorflow.python import tf2
37 from tensorflow.python.client import pywrap_tf_session
~\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tfe.py in <module>
26
27 # pylint: disable=invalid-import-order,g-bad-import-order, wildcard-import, unused-import
---> 28 from tensorflow.python import pywrap_tensorflow
29 from tensorflow.python._pywrap_tfe import *
~\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow.py in <module>
81 for some common reasons and solutions. Include the entire stack trace
82 above this error message when asking for help.""" % traceback.format_exc()
---> 83 raise ImportError(msg)
84
85 # pylint: enable=wildcard-import,g-import-not-at-top,unused-import,line-too-long
ImportError: Traceback (most recent call last):
File "C:\Users\REDACTED\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.
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.
I have deleted and reinstalled the tensorflow module as well.我也删除并重新安装了 tensorflow 模块。
Any help would be very much appreciated!任何帮助将不胜感激!
The error is because Tensorflow requires Microsoft Visual C++ Redistributable for Visual Studio 2015,2017,2019 as shown in the installation step on the Tensorflow.org该错误是因为 Tensorflow 需要 Microsoft Visual C++ Redistributable for Visual Studio 2015,2017,2019,如ZCB20B802A3F0255E054E4FB8Z219上的安装步骤所示。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.