Sto cercando di importare i panda mentre utilizzo iPython. Il mio scopo generale è usare XLwings.Come risolvere l'errore di importazione per i panda utilizzando iPython Notebook su Windows?
Sono su Windows 7 e ho usato Anaconda per installare Python, i panda e tutte le dipendenze.
Ecco il mio codice:
from pandas import DataFrame
che dà:
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.
Può chiunque con esperienza di utilizzo di Python/panda in ipython su Windows aiutarmi a capire come risolvere questo errore?
In particolare, dove eseguo "python setup.py build_ext --inplace"?
Grazie!
no. C'è un bug nelle versioni precedenti (di conda) dove, se avessi aggiornato i panda mentre era in uso, non si aggiornava correttamente. Prova a chiudere tutti i processi python, quindi '' conda remove pandas; conda install pandas'' – Jeff
Doh! Ha funzionato perfettamente! Grazie Jeff. –