我在我的Mac Book Pro上使用Python 3.5。我使用 pip3 install pandas
如果我打開ipython
和運行 import pandas as pd
我碰到下面的錯誤安裝的大熊貓。Python 3.5熊貓導入錯誤
ImportError Traceback (most recent call last)
/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/pandas/__init__.py in <module>()
6 try:
----> 7 from pandas import hashtable, tslib, lib
8 except ImportError as e: # pragma: no cover
ImportError: cannot import name 'hashtable'
During handling of the above exception, another exception occurred:
ImportError Traceback (most recent call last)
<ipython-input-1-af55e7023913> in <module>()
----> 1 import pandas as pd
/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/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.
的C擴展難道'PIP3安裝pandas'給任何錯誤消息? –
使用Anaconda。其實,安裝Miniconda,然後運行'conda install pandas'。在Continnum.io,您的安心對他們非常重要。 – Kartik