今天因為數據處理的需要,安裝了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,這樣再
重新運行,問題就解決了。