我想在使用iPython的同時導入熊貓。我的總體目標是使用XLwings。如何解決在Windows上使用iPython Notebook的熊貓導入錯誤?
我在Windows 7上,並使用Anaconda來安裝Python,熊貓和所有的依賴關係。
這裏是我的代碼:
from pandas import DataFrame
其中給出:
ImportError Traceback (most recent call last)
<ipython-input-7-26dfcabfb474> in <module>()
----> 1 from pandas import DataFrame
C:\Users\Accounting\Anaconda\lib\site-packages\pandas\__init__.py in <module>()
11 "pandas from the source directory, you may need to run "
12 "'python setup.py build_ext --inplace' to build the C "
---> 13 "extensions first.".format(module))
14
15 from datetime import datetime
ImportError: C extension: hashtable not built. If you want to import pandas from the source directory, you may need to run 'python setup.py build_ext --inplace' to build the C extensions first.
任何人都可以在Windows中IPython中使用Python /大熊貓的經驗幫助我瞭解如何解決這個問題?
具體我在哪裏運行「python setup.py build_ext --inplace」?
謝謝!
你沒有。舊版本(conda)中存在一個錯誤,如果您在更新熊貓期間更新了它,但它沒有正確更新。嘗試關閉所有的Python進程,然後''conda刪除熊貓; conda安裝pandas'' – Jeff
Doh!這工作完美!謝謝傑夫。 –