我正在使用 Pycharm IDE。当我运行我的代码时,它会显示一些错误,即使我清理了我的所有代码并只写了“将熊猫导入为 pd”。而且之前已经安装了熊猫库。请帮我解决这个问题 这些是错误:
Traceback (most recent call last):
File "C:\Users\SAMIN\PycharmProjects\pythonProject1\main.py", line 1, in <module>
import pandas as p
File "C:\Users\SAMIN\PycharmProjects\pythonProject1\venv\lib\site-packages\pandas\__init__.py", line 11, in <module>
__import__(dependency)
File "C:\Users\SAMIN\PycharmProjects\pythonProject1\venv\lib\site-packages\numpy\__init__.py", line 305, in <module>
_win_os_check()
File "C:\Users\SAMIN\PycharmProjects\pythonProject1\venv\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\\SAMIN\\PycharmProjects\\pythonProject1\\venv\\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: (the page url to help)
答案 0 :(得分:0)
Windows 上最新版本的 numpy 似乎存在一些问题。尝试卸载 numpy 并重新安装 1.19.3 版:
select t, b, c,
(case when c is not null then dense_rank() over (order by almost_d) end) as d
from (select times.t, coalesce(t.b, 'no exam') as b, c,
sum(case when c is null then 1 else 0 end) over (order by times.t) as almost_d
from times left join
t
on times.t = t.a
) t
来源:How do you fix "runtimeError: package fails to pass a sanity check" for numpy and pandas?