Does Dateutil.tz package seem to be missing when using Pandas?

My python 2.7 code is as follows:

import pandas as pd from pandas import DataFrame DF_rando = DataFrame([1,2,3]) 

... and then when I execute, I get a strange error regarding dateutil.tz .

 /Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7 /Users/mattobrien/pandas_test.py No module named dateutil.tz Traceback (most recent call last): File "/Users/mattobrien/pandas_test.py", line 2, in <module> import pandas as pd File "/Library/Python/2.7/site-packages/pandas/__init__.py", line 7, in <module> from . import hashtable, tslib, lib File "pandas/tslib.pyx", line 37, in init pandas.tslib (pandas/tslib.c:76999) ImportError: No module named dateutil.tz Process finished with exit code 1 

Very strange. I checked really dateutil.tz really installed. I uninstalled Pandas and reinstalled it to make sure. No problems.

Why am I getting this error?

+6
source share
1 answer

These 2 lines are needed.

sudo pip install python-dateutil --upgrade

sudo pip install pytz --upgrade

+15
source

Source: https://habr.com/ru/post/978163/


All Articles