简体   繁体   English

Anaconda Tensorflow- ImportError: DLL 加载失败:找不到指定的模块

[英]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.

相关问题 尝试安装TensorFlow- GPU ...失败,但出现ImportError:DLL加载失败:找不到指定的模块 - Trying to install TensorFlow- GPU…failed with ImportError: DLL load failed: The specified module could not be found anaconda3中的ImportError:DLL加载失败:找不到指定的模块 - ImportError in anaconda3 : DLL load failed: The specified module could not be found Tensorflow:ImportError:DLL 加载失败:找不到指定的模块 - Tensorflow: ImportError: DLL load failed: The specified module could not be found Windows 上的 Tensorflow - ImportError:DLL 加载失败:找不到指定的模块 - Tensorflow on windows - ImportError: DLL load failed: The specified module could not be found tensorflow 2.3.1 导入错误:DLL 加载失败:找不到指定的模块 - tensorflow 2.3.1 ImportError: DLL load failed: The specified module could not be found Tensorflow 错误:ImportError: DLL 加载失败:找不到指定的模块 - Tensorflow Error: ImportError: DLL load failed: The specified module could not be found numpy 已与 Anaconda 一起安装,但我收到 ImportError(DLL 加载失败:找不到指定的模块) - numpy is already installed with Anaconda but I get an ImportError (DLL load failed: The specified module could not be found) ImportError: DLL 加载失败:在 anaconda 环境的 VS 代码 Jupyter 笔记本中找不到指定的模块 - ImportError: DLL load failed: The specified module could not be found in VS code Jupyter notebook with anaconda environment 无法打开 ANACONDA 或 SPYDER:ImportError: DLL 加载失败:找不到指定的模块 - Unable to open ANACONDA or SPYDER: ImportError: DLL load failed: The specified module could not be found Tensorflow: ImportError: DLL load failed while importing _pywrap_tensorflow_internal: 找不到指定的模块 - Tensorflow: ImportError: DLL load failed while importing _pywrap_tensorflow_internal: The specified module could not be found
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM