python - 在简单的python脚本中导入熊猫后出错
问题描述
所以基本上我只是创建了一个 virtualenv 并在运行pip install pandas
并尝试运行我的脚本后,这个错误会跳出来:
我不明白,当我导入 pandas 时,错误出现在 grist 行中。如果我只是删除此行...脚本照常工作
我能做些什么 ???请帮助!
更新:
文本错误:
Python(25555,0x110fc3dc0) malloc: can't allocate region
:*** mach_vm_map(size=18446744071807086592, flags: 100) failed (error code=3)
Python(25555,0x110fc3dc0) malloc: *** set a breakpoint in malloc_error_break to debug
init_dgelsd failed init
Traceback (most recent call last):
File "/Users/deivbid/Documents/David/Python/Scrapper/main.py", line 1, in <module>
import pandas as pd
File "/Users/deivbid/Documents/David/Python/Scrapper/env/lib/python3.9/site-packages/pandas/__init__.py", line 11, in <module>
__import__(dependency)
File "/Users/deivbid/Documents/David/Python/Scrapper/env/lib/python3.9/site-packages/numpy/__init__.py", line 286, in <module>
raise RuntimeError(msg)
RuntimeError: Polyfit sanity test emitted a warning, most likely due to using a buggy Accelerate backend. If you compiled yourself, see site.cfg.example for information. Otherwise, report this to the vendor that provided NumPy.
RankWarning: Polyfit may be poorly conditioned
Python 版本:3.9.0 点子版本:20.2.3
解决方案
得到了同样的错误,发现了这个:https ://github.com/numpy/numpy/issues/15947
对我来说 pip3 install numpy==1.18.0 解决了这个问题
推荐阅读
- python - 是否可以在 Python 中将通用 C[T] 静态类型为 T ?
- node.js - 在 node.JS 串行上发送二进制文件
- python - 散景 CheckBoxGroupButton
- html - 允许子元素溢出,同时保持父元素的可滚动性
- web-applications - 当您使用 Progressive Web App 时,它会显示在浏览器历史记录或选项卡中吗?
- calc - “Openoffice Calc”使用 IF 比较时间总是返回 false
- jquery - JS数据表返回空白行
- node.js - 如何使用来自私有 github 的 npm 包?
- javascript - Android 上 SearchBar 替代方案的 showCancel
- azure-storage - 从存储帐户获取 bash 脚本并安装在 Linux VMSS 中