我安裝了熊貓模塊。它需要最新版本的numpy,並且我有一箇舊的pip安裝了熊貓模塊,該模塊還安裝了包括numpy在內的所有依賴項。當我嘗試導入大熊貓模塊在我的代碼,我得到的錯誤如下:熊貓模塊導入錯誤
/Library/Python/2.6/site-packages/pytz/__init__.py:35:
UserWarning: Module dateutil was already imported from /System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/dateutil/__init__.pyc, but /Library/Python/2.6/site-packages is being added to sys.path
from pkg_resources import resource_stream
Traceback (most recent call last):
File "Python-3.py", line 10, in <module>
from pandas.io.data import DataReader
File "/Library/Python/2.6/site-packages/pandas/__init__.py", line 25, in <module>
import pandas.core.config_init
File "/Library/Python/2.6/site-packages/pandas/core/config_init.py", line 4, in <module>
from pandas.core.format import detect_console_encoding
File "/Library/Python/2.6/site-packages/pandas/core/format.py", line 25, in <module>
from pandas.tseries.period import PeriodIndex
File "/Library/Python/2.6/site-packages/pandas/tseries/period.py", line 7, in <module>
import pandas.tseries.offsets as offsets
File "/Library/Python/2.6/site-packages/pandas/tseries/offsets.py", line 3, in <module>
from pandas.tseries.tools import to_datetime
File "/Library/Python/2.6/site-packages/pandas/tseries/tools.py", line 19, in <module>
dateutil.__version__ == '2.0'): # pragma: no cover
AttributeError: 'module' object has no attribute '__version__'
我無法弄清楚爲什麼我收到此錯誤以及如何糾正它。
任何人都可以幫助我嗎?
謝謝!
看起來你已經安裝了Python的兩個副本(一個在'/系統/ Library',一個在'/庫/')有些東西對使用哪一個感到困惑。 – BrenBarn 2013-05-05 17:24:48