【问题标题】:I am facing an error while importing tensorflow 2.0.0导入 tensorflow 2.0.0 时遇到错误
【发布时间】:2020-11-23 13:21:49
【问题描述】:

我已经使用以下代码通过 anaconda 安装了 tensorflow:-

conda install tensorflow==2.0.0

但我无法导入它并且弹出以下错误:-

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
~\AppData\Roaming\Python\Python37\site-packages\tensorflow\python\pywrap_tensorflow.py in 
<module>
     57 
---> 58   from tensorflow.python.pywrap_tensorflow_internal import *
     59 

~\AppData\Roaming\Python\Python37\site-packages\tensorflow\python\pywrap_tensorflow_internal.py 
in <module>
 27             return _mod
---> 28     _pywrap_tensorflow_internal = swig_import_helper()
 29     del swig_import_helper

~\AppData\Roaming\Python\Python37\site-packages\tensorflow\python\pywrap_tensorflow_internal.py 
in swig_import_helper()
 23             try:
---> 24                 _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, 
description)
 25             finally:

~\anaconda3\envs\iNeuron\lib\imp.py in load_module(name, file, filename, details)
241         else:
--> 242             return load_dynamic(name, filename, file)
243     elif type_ == PKG_DIRECTORY:

~\anaconda3\envs\iNeuron\lib\imp.py in load_dynamic(name, path, file)
    341             name=name, loader=loader, origin=path)
--> 342         return _load(spec)
    343 

ImportError: DLL load failed: A dynamic link library (DLL) initialization routine failed.

我通过降级 tensorflow 版本尝试了多种方法,但似乎没有任何效果。 请求某人帮助我解决这个问题。 提前致谢。

【问题讨论】:

  • this 我有类似的问题并最终设法找到解决方案。尝试这些步骤,如果您有任何问题,请在评论中写下我非常乐意提供帮助。

标签: python windows tensorflow


【解决方案1】:

尝试复制这些包:

  • libcrypto-1_1-x64.*
  • libssl-1_1-x64.*

Anaconda3\Library\bin 到您的Anaconda3\DLLs 文件夹。

【讨论】:

  • 我没听懂你。复制你的意思是把它贴在这里供你参考?
猜你喜欢
  • 2021-11-10
  • 2017-08-30
  • 1970-01-01
  • 2022-10-16
  • 1970-01-01
  • 2021-04-14
  • 2021-03-24
  • 2017-11-04
  • 2023-03-03
相关资源
最近更新 更多