import pandas时报错的解决办法
·
错误1 :
“ImportError: C extension: None not built. If you want to import pandas from the source directory, you may need to run 'python setup.py build_ext' to build the C extensions first.”
这个错误表明 pandas 的 C 扩展没有正确编译或安装。这是一个比较常见的问题,使用下面的方法
解决1:卸载后重新安装
pip uninstall pandas numpy
pip install pandas numpy
解决2:安装更兼容的版本
pip uninstall pandas numpy
pip install "pandas<2.0" "numpy<1.24"
错误2 :

解决:安装2以下版本的Numpy。
pip install 'numpy<2'
更多推荐
所有评论(0)