问题
I'm running the jupyter notebook (Enthought Canopy python distribution 2.7) on Mac OSX (v 10.13.6). When I try to import pandas (import pandas as pd), I am getting the complaint: ImportError: dateutil 2.5.0 is the minimum required version. I have these package versions:
- Canopy version 2.1.3.3542 (64 bit)
- jupyter version 1.0.0-25
- pandas version 0.23.1-1
- python_dateutil version 2.6.0-1
I'm not getting this complaint when I run with the Canopy Editor so it must be some jupyter compatibility problem. Does anyone have a solution on how to fix this? All was well a few months ago until I recently (and mindlessly) allowed an update of my packages.
回答1:
For me to solve this issue I had to install python-dateutil library.
pip install python-dateutil==2.5.0
This was resolved the issue.
回答2:
I had this same issue using the newest pandas version - downgrading to pandas 0.22.0 fixes the problem.
pip install pandas==0.22.0
回答3:
Installed Canopy version 2.1.9. The downloaded version worked without updating any of the packages called out by the Canopy Package Manager. Updated all the packages, but then the "import pandas as pd" failed when using the jupyter notebook. Downgraded the notebook package from 4.4.1-5 to 4.4.1-4 which cascaded to 35 additional package downgrades. Retested the import of pandas and the issue seems to have disappeared.
回答4:
Following command worked for me
sudo -H pip install --ignore-installed -U ipython
sudo -H pip install --ignore-installed -U pyzmq
回答5:
The issue is with the pandas lib
downgrade using the command below
pip install pandas==0.22.0
来源:https://stackoverflow.com/questions/51470373/dateutil-2-5-0-is-the-minimum-required-version