RuntimeError: The current Numpy installation (’…\numpy\init.py’) fails to pass a sanity check due to a bug in the windows runtime.
在使用pandas.DataFrame()写入数据的时候的时候,报了一个:
明明我没有使用numpy为什么会报numpy缺少属性"ndarray"这个错误呢?
百度半天没解决问题,问了一下大佬,大佬解释说,在使用pandas模块添加数据的时候,要依赖numpy模块转换格式。所以需要导入numpy库。我用的python3.9,在pycharm中直接导入numpy时,会自动导入1.19.4。然后就会出现这个错误:
RuntimeError: The current Numpy installation
('...\numpy\init.py') fails to pass a sanity check due to a bug in the windows