ImportError: DLL load failed: 找不到指定的模块。Anaconda下tensorflow的安装教程。

在Windows 10的Anaconda3环境中,安装TensorFlow时遇到DLL加载失败问题。解决方法是降级到TensorFlow1.12,卸载先前版本,安装后需修改文件以解决与新版本numpy的兼容性问题。完成安装后,TensorBoard也可正常使用。
摘要由CSDN通过智能技术生成

问题:在windows下,Anaconda环境中,安装tensorflow时遇到ImportError: DLL load failed: 找不到指定的模块 问题。
环境:windows10+Anaconda3+python3.6.5+cuda10.1+cuDNN7.6.4.3,编译器使用VS2017和Pycharm。
本来使用的是pytorch,因为pytorch没有可视化工具,因此想安装tensorboard,要安装tensorboard,需要安装tensorflow。使用pip、conda搞了一天,总算折腾好了。
解决方法:换个版本。。。
尝试安装tensorflow2.1.0各种方法都不成功,虽然tensoeflow官网上写的支持这套环境的是tensorflow2.1.0。一直报的 错误如图所示:

(base) C:\Users\Administrator>python -c "import tensorflow as tf; print(tf.reduce_sum(tf.random.normal([1000, 1000])))"
Traceback (most recent call last):
  File "C:\Users\Administrator\AppData\Roaming\Python\Python36\site-packages\tensorflow_core\python\pywrap_tensorflow.py", line 58, in <module>
    from tensorflow.python.pywrap_tensorflow_internal import *
  File "C:\Users\Administrator\AppData\Roaming\Python\Python36\site-packages\tensorflow_core\python\pywrap_tensorflow_internal.py", line 28, in <module>
    _pywrap_tensorflow_internal = swig_import_helper()
  File "C:\Users\Administrator\AppData\Roaming\Python\Python36\site-packages\tensorflow_core\python\pywrap_tensorflow_internal.py", line 24, in swig_import_helper
    _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
  File "D:\VS_2017\Anaconda3_64\lib\imp.py", line 243, in load_module
    return load_dynamic(name, filename, file)
  File "D:\VS_2017\Anaconda3_64\lib\imp.py", line 343, in load_dynamic
    return _load(spec)
ImportError: DLL load failed: 找不到指定的模块。
During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\Administrator\AppData\Roaming\Python\Python36\site-packages\tensorflow\__init__.py", line 101, in <module>
    from tensorflow_core import *
  File "C:\Users\Administrator\AppData\Roaming\Python\Python36\site-packages\tensorflow_core\__init__.py", line 40, in <module>
    from tensorflow.python.tools import module_util as _module_util
  File "C:\Users\Administrator\AppData\Roaming\Python\Python36\site-packages\tensorflow\__init__.py", line 50, in __getattr__
    module = self._load()
  File "C:\Users\Administrator\AppData\Roaming\Python\Python36\site-packages\tensorflow\__init__.py", line 44, in _load
    module = _importlib.import_module(self.__name__)
  File "D:\VS_2017\Anaconda3_64\lib\importlib\__init__.py"
  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值