[英]Anaconda Tensorflow- ImportError: DLL load failed: The specified module could not be found
I am trying to work on a ML model and install libraries such as tensorflow.我正在尝试使用 ML model 并安装诸如 tensorflow 之类的库。 I am doing this using Anaconda prompt and want to work on Jupyter Notebook.
我正在使用 Anaconda 提示符执行此操作,并希望在 Jupyter Notebook 上工作。
python --version
Python 3.7.2
conda create -n venv python=3.7.2 conda create -n venv python=3.7.2
Since I am using python 3. version I install tensorflow at this:由于我使用的是 python 3. 版本,因此我在此安装 tensorflow:
pip3 install --upgrade tensorflow
Then I go to python interpreter to test module:然后我 go 到 python 解释器来测试模块:
import tensorflow as tf
Traceback (most recent call last):
File "C:\Users\shankar.ts\Anaconda3\envs\venv\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.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\shankar.ts\Anaconda3\envs\venv\lib\site-packages\tensorflow\__init__.py", line 41,
in <module>
from tensorflow.python.tools import module_util as _module_util
File "C:\Users\shankar.ts\Anaconda3\envs\venv\lib\site-packages\tensorflow\python\__init__.py",
line 40, in <module>
from tensorflow.python.eager import context
File "C:\Users\shankar.ts\Anaconda3\envs\venv\lib\site-
packages\tensorflow\python\eager\context.py", line 35, in <module>
from tensorflow.python import pywrap_tfe
File "C:\Users\shankar.ts\Anaconda3\envs\venv\lib\site-
packages\tensorflow\python\pywrap_tfe.py", line 28, in <module>
from tensorflow.python import pywrap_tensorflow
File "C:\Users\shankar.ts\Anaconda3\envs\venv\lib\site-
packages\tensorflow\python\pywrap_tensorflow.py", line 83, in <module>
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "C:\Users\shankar.ts\Anaconda3\envs\venv\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.
I have tried downgrading my tensorflow version to 2.0.0 based on recommendations and I get: Version not found我尝试根据建议将我的 tensorflow 版本降级到 2.0.0,我得到:找不到版本
I would like to know what the issue is and how I must fix it.Also how I can check this and run it on Jupyter Notebook我想知道问题是什么以及我必须如何解决它。还有我如何检查它并在 Jupyter Notebook 上运行它
Conda has its own binaries and it is recommended to install python modules from conda source with conda install: Conda 有自己的二进制文件,建议使用 conda install 从 conda 源安装 python 模块:
conda install -c conda-forge tensorflow
Create new environment and install all modules you need with conda install (eg Jupyter )创建新环境并使用 conda install 安装您需要的所有模块(例如Jupyter )
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.