文章详情

短信预约-IT技能 免费直播动态提醒

请输入下面的图形验证码

提交验证

短信预约提醒成功

TensorFlow ImportError: initialization failed

2023-09-21 13:54

关注

ImportError: initialization failed

报错内容:

D:\Users\Administrator\miniconda3\envs\pynew\lib\site-packages\numpy\core\__init__.py:29: UserWarning: loaded more than 1 DLL from .libs:
D:\Users\Administrator\miniconda3\envs\pynew\lib\site-packages\numpy\.libs\libopenblas.TXA6YQSD3GCQQC22GEQ54J2UDCXDXHWN.gfortran-win_amd64.dll
D:\Users\Administrator\miniconda3\envs\pynew\lib\site-packages\numpy\.libs\libopenblas.XWYDX2IKJW2NMTWSFYNGFUWKQU3LYTCZ.gfortran-win_amd64.dll
  stacklevel=1)
RuntimeError: module compiled against API version 0xe but this version of numpy is 0xd
ImportError: numpy.core.multiarray failed to import

The above exception was the direct cause of the following exception:

SystemError: returned a result with an error set

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "D:\Users\Administrator\miniconda3\envs\pynew\lib\runpy.py", line 183, in _run_module_as_main
    mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
  File "D:\Users\Administrator\miniconda3\envs\pynew\lib\runpy.py", line 109, in _get_module_details
    __import__(pkg_name)
  File "D:\Users\Administrator\miniconda3\envs\pynew\lib\site-packages\tf2onnx\__init__.py", line 10, in
    from . import verbose_logging as logging
  File "D:\Users\Administrator\miniconda3\envs\pynew\lib\site-packages\tf2onnx\verbose_logging.py", line 14, in
    import tensorflow as tf
  File "D:\Users\Administrator\miniconda3\envs\pynew\lib\site-packages\tensorflow\__init__.py", line 37, in
    from tensorflow.python.tools import module_util as _module_util
  File "D:\Users\Administrator\miniconda3\envs\pynew\lib\site-packages\tensorflow\python\__init__.py", line 37, in
    from tensorflow.python.eager import context
  File "D:\Users\Administrator\miniconda3\envs\pynew\lib\site-packages\tensorflow\python\eager\context.py", line 35, in
    from tensorflow.python.client import pywrap_tf_session
  File "D:\Users\Administrator\miniconda3\envs\pynew\lib\site-packages\tensorflow\python\client\pywrap_tf_session.py", line 19, in
    from tensorflow.python.client._pywrap_tf_session import *
ImportError: initialization failed

解决方法:重装numpy

pip uninstall numpy

pip install numpy

来源地址:https://blog.csdn.net/jacke121/article/details/128070264

阅读原文内容投诉

免责声明:

① 本站未注明“稿件来源”的信息均来自网络整理。其文字、图片和音视频稿件的所属权归原作者所有。本站收集整理出于非商业性的教育和科研之目的,并不意味着本站赞同其观点或证实其内容的真实性。仅作为临时的测试数据,供内部测试之用。本站并未授权任何人以任何方式主动获取本站任何信息。

② 本站未注明“稿件来源”的临时测试数据将在测试完成后最终做删除处理。有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341

软考中级精品资料免费领

  • 历年真题答案解析
  • 备考技巧名师总结
  • 高频考点精准押题
  • 2024年上半年信息系统项目管理师第二批次真题及答案解析(完整版)

    难度     813人已做
    查看
  • 【考后总结】2024年5月26日信息系统项目管理师第2批次考情分析

    难度     354人已做
    查看
  • 【考后总结】2024年5月25日信息系统项目管理师第1批次考情分析

    难度     318人已做
    查看
  • 2024年上半年软考高项第一、二批次真题考点汇总(完整版)

    难度     435人已做
    查看
  • 2024年上半年系统架构设计师考试综合知识真题

    难度     224人已做
    查看

相关文章

发现更多好内容

猜你喜欢

AI推送时光机
位置:首页-资讯-后端开发
咦!没有更多了?去看看其它编程学习网 内容吧
首页课程
资料下载
问答资讯