python pandas import 失败


今天因为数据处理的需要,安装了pandas。

我的python版本是2.7,使用的编辑器是pycharm。我现在cmd中输入了pip install pandas,然后显示安装成功,但是在使用pandas.read_pickle()时报错了。

以下是我的错误:

ImportError: C extension:numpy.core.utils not built. If you want to import pandas from the source directory, you may need to run 'python setup.py build_ext --inplace --force' to build the C extensions first.

 

解决方案:

看了一下错误,是numpy的问题。因为numpy是之前装的,已经忘记了它的相关配置,为了保险起见,我就卸载了pandas和numpy,然后在pycharm-file-setting-project intepreters-+中重新安装了numpy和pandas,这样再

重新运行,问题就解决了。

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM