在下载第三方库Numpy时出现fails to pass a sanity check due to a bug in the windows runtime.问题

博客介绍了numpy版本问题的解决方法。先在终端输入pip list查看Numpy版本,若为1.19.4则是版本过高。最快解决办法是进入pycharm设置界面,找到project interpreter,双击numpy,勾选后选择版本,点击install package完成安装。

numpy的版本问题

首先,在终端中输入 pip list 命令,查看其中Numpy 的版本,如果是1.19.4,就是版本过高问题了。

最快解决

进入pycharm设置界面,找到project interpreter


之后双击numpy,会跳转到这个界面

在这里插入图片描述

在前面打个对勾,就可以选择版本了,然后点击installpackage ,等安装好了就可以了。
在这里插入图片描述

希望可以帮助到你!

>> Require Python matplotlib module >> Require Python matplotlib module pylab submodule A module that was compiled using NumPy 1.x cannot be run in NumPy 2.2.6 as it may crash. To support both 1.x and 2.x versions of NumPy, modules must be compiled with NumPy 2.0. Some module may need to rebuild instead e.g. with 'pybind11>=2.12'. If you are a user of the module, the easiest solution will be to downgrade to 'numpy<2' or try to upgrade the affected module. We expect that some modules will need time to support NumPy 2. Traceback (most recent call last): File "<string>", line 3, in <module> AttributeError: _ARRAY_API not found >> Require python opencv version greater than 3 or 4. Got N/A A module that was compiled using NumPy 1.x cannot be run in NumPy 2.2.6 as it may crash. To support both 1.x and 2.x versions of NumPy, modules must be compiled with NumPy 2.0. Some module may need to rebuild instead e.g. with 'pybind11>=2.12'. If you are a user of the module, the easiest solution will be to downgrade to 'numpy<2' or try to upgrade the affected module. We expect that some modules will need time to support NumPy 2. Traceback (most recent call last): File "<string>", line 3, in <module> File "/home/ts/.local/lib/python3.10/site-packages/colour/__init__.py", line 72, in <module> from colour import plotting # noqa: F401 File "/home/ts/.local/lib/python3.10/site-packages/colour/plotting/__init__.py", line 3, in <module> if not is_matplotlib_installed(): # pragma: no cover File "/home/ts/.local/lib/python3.10/site-packages/colour/utilities/requirements.py", line 107, in is_matplotlib_installed import matplotlib as mpl # noqa: F401 File "/usr/lib/python3/dist-packages/matplotlib/__init__.py", line 109, in <module> from . import _api, _version, cbook, docstring, rcsetup File "/usr/lib/python3/dist-packages/matplotlib/rcsetup.py", line 27, in <module> from matplotlib.colors import Colormap, is_color_like File "/usr/lib/python3/dist-packages/matplotlib/colors.py", line 56, in <module> from matplotlib import _api, cbook, scale File "/usr/lib/python3/dist-packages/matplotlib/scale.py", line 23, in <module> from matplotlib.ticker import ( File "/usr/lib/python3/dist-packages/matplotlib/ticker.py", line 136, in <module> from matplotlib import transforms as mtransforms File "/usr/lib/python3/dist-packages/matplotlib/transforms.py", line 46, in <module> from matplotlib._path import ( AttributeError: _ARRAY_API not found A module that was compiled using NumPy 1.x cannot be run in NumPy 2.2.6 as it may crash. To support both 1.x and 2.x versions of NumPy, modules must be compiled with NumPy 2.0. Some module may need to rebuild instead e.g. with 'pybind11>=2.12'. If you are a user of the module, the easiest solution will be to downgrade to 'numpy<2' or try to upgrade the affected module. We expect that some modules will need time to support NumPy 2. Traceback (most recent call last): File "<string>", line 3, in <module> File "/home/ts/.local/lib/python3.10/site-packages/colour/__init__.py", line 72, in <module> from colour import plotting # noqa: F401 File "/home/ts/.local/lib/python3.10/site-packages/colour/plotting/__init__.py", line 9, in <module> is_matplotlib_installed(raise_exception=True) File "/home/ts/.local/lib/python3.10/site-packages/colour/utilities/requirements.py", line 107, in is_matplotlib_installed import matplotlib as mpl # noqa: F401 File "/usr/lib/python3/dist-packages/matplotlib/__init__.py", line 109, in <module> from . import _api, _version, cbook, docstring, rcsetup File "/usr/lib/python3/dist-packages/matplotlib/rcsetup.py", line 27, in <module> from matplotlib.colors import Colormap, is_color_like File "/usr/lib/python3/dist-packages/matplotlib/colors.py", line 56, in <module> from matplotlib import _api, cbook, scale File "/usr/lib/python3/dist-packages/matplotlib/scale.py", line 23, in <module> from matplotlib.ticker import ( File "/usr/lib/python3/dist-packages/matplotlib/ticker.py", line 136, in <module> from matplotlib import transforms as mtransforms File "/usr/lib/python3/dist-packages/matplotlib/transforms.py", line 46, in <module> from matplotlib._path import ( AttributeError: _ARRAY_API not found /home/ts/.local/lib/python3.10/site-packages/colour/utilities/verbose.py:322: ColourUsageWarning: "Matplotlib" related API features are not available: "numpy.core.multiarray failed to import". See the installation guide for more information: https://www.colour-science.org/installation-guide/ warn(*args, **kwargs) # noqa: B028
最新发布
06-18
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值