ICode9

精准搜索请尝试: 精确搜索
首页 > 编程语言> 文章详细

python中numpy包报错 _win_os_check()

2020-12-23 12:33:15  阅读:129  来源: 互联网

标签:__ __. NeuralNetworks python numpy py 报错 os check


报错

Traceback (most recent call last):
  File "C:/Users/Administrator/Desktop/NeuralNetworks/NeuralNerwork.py", line 2, in <module>
    import numpy
  File "C:\Users\Administrator\NeuralNetworks\lib\site-packages\numpy\__init__.py", line 305, in <module>
    _win_os_check()
  File "C:\Users\Administrator\NeuralNetworks\lib\site-packages\numpy\__init__.py", line 302, in _win_os_check
    raise RuntimeError(msg.format(__file__)) from None
RuntimeError: The current Numpy installation ('C:\\Users\\Administrator\\NeuralNetworks\\lib\\site-packages\\numpy\\__init__.py') fails to pass a sanity check due to a bug in the windows runtime. See this issue for more information: https://tinyurl.com/y3dm3h86

解决方法

在__init__.py中将这一行a = a % 17 注释掉

    def _win_os_check():
        """
        Quick Sanity check for Windows OS: look for fmod bug issue 16744.
       """
        try:
            a = arange(13 * 13, dtype= float64).reshape(13, 13)
            # a = a % 17  # calls fmod
            linalg.eig(a)
        except Exception:
            msg = ("The current Numpy installation ({!r}) fails to "
                   "pass a sanity check due to a bug in the windows runtime. "
                   "See this issue for more information: "
                   "https://tinyurl.com/y3dm3h86")
            raise RuntimeError(msg.format(__file__)) from None

标签:__,__.,NeuralNetworks,python,numpy,py,报错,os,check
来源: https://blog.csdn.net/joey_ro/article/details/111587183

专注分享技术,共同学习,共同进步。侵权联系[admin#icode9.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有