Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

six inclusion for dateutil on py3 doesn't work #1154

Merged
merged 1 commit into from Aug 28, 2012

Conversation

mdboom
Copy link
Member

@mdboom mdboom commented Aug 28, 2012

I just installed the current HEAD to a fresh python3 install. It all installs fine, but if I try to do ipython --pylab, I get this ImportError:

/usr/local/Cellar/python3/3.2.3/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/dateutil/rrule.py in <module>()
     16 import sys
     17 
---> 18 from six import advance_iterator, integer_types
     19 
     20 __all__ = ["rrule", "rruleset", "rrulestr",

ImportError: No module named six

The six.py introduced in lib/dateutil_py3 in 07d8416 is included in my site-packages/dateutil folder, but the attempted relative import doesn't work (thanks to PEP 328).

To solve this, matplotlib should install six directly into site-packages when on python 3 if not already present, or alternatively change all six imports in dateutil to from .six import ....

(An easy workaround for users is of course to pip install six or pip install python-dateutil, which includes six as a dependency.)

@mdboom
Copy link
Member

mdboom commented Aug 27, 2012

Sorry -- that's just a big oops on my part. I will fix this before the upcoming release.

@ghost ghost assigned mdboom Aug 27, 2012
@djsutherland
Copy link
Author

No worries, it's obviously easy to work around, just wanted to make sure it didn't make it into the release. :)

…elated issues related to installing dateutil and pytz on Python 3.
@mdboom
Copy link
Member

mdboom commented Aug 28, 2012

@dougalsutherland : Can you check that the attached PR resolves the issue for you?

@djsutherland
Copy link
Author

Yep, works for me.

mdboom added a commit that referenced this pull request Aug 28, 2012
six inclusion for dateutil on py3 doesn't work
@mdboom mdboom merged commit 8cefc3f into matplotlib:master Aug 28, 2012
@mdboom mdboom deleted the fix_six branch March 3, 2015 18:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants