[英]Import error while import pandas
import pandas as pd
導入熊貓時出現以下錯誤。 任何人都可以幫助我我對python比較陌生。 我為此使用 raspberry,安裝的 os 是 raspbian os。
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
/usr/local/lib/python3.5/dist-packages/pandas/__init__.py in <module>()
25 try:
---> 26 from pandas._libs import (hashtable as _hashtable,
27 lib as _lib,
/usr/local/lib/python3.5/dist-packages/pandas/_libs/__init__.py in <module>()
3
----> 4 from .tslib import iNaT, NaT, Timestamp, Timedelta, OutOfBoundsDatetime
5
ImportError: cannot import name 'iNaT'
During handling of the above exception, another exception occurred:
ImportError Traceback (most recent call last)
<ipython-input-3-7dd3504c366f> in <module>()
----> 1 import pandas as pd
/usr/local/lib/python3.5/dist-packages/pandas/__init__.py in <module>()
33 "pandas from the source directory, you may need to run "
34 "'python setup.py build_ext --inplace --force' to build "
---> 35 "the C extensions first.".format(module))
36
37 from datetime import datetime
ImportError: C extension: 'iNaT' 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.
這樣安裝:
sudo apt 安裝 python3-pandas
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.