Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#44882 - matplotlib.pyplot import fails with ImportError: cannot import name zip_longest

Attached to Project: Arch Linux
Opened by SpaceOne (spaceone) - Wednesday, 06 May 2015, 21:53 GMT
Last edited by Doug Newgard (Scimmia) - Thursday, 07 May 2015, 13:11 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To No-one
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details


$ python2
>>> import six
>>> six.__version__
'1.9.0'
>>> six.__file__
'/usr/lib/python2.7/site-packages/six.pyc'
>>> import matplotlib.pyplot
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.7/site-packages/matplotlib/pyplot.py", line 34, in <module>
from matplotlib.figure import Figure, figaspect
File "/usr/lib/python2.7/site-packages/matplotlib/figure.py", line 40, in <module>
from matplotlib.axes import Axes, SubplotBase, subplot_class_factory
File "/usr/lib/python2.7/site-packages/matplotlib/axes/__init__.py", line 4, in <module>
from ._subplots import *
File "/usr/lib/python2.7/site-packages/matplotlib/axes/_subplots.py", line 10, in <module>
from matplotlib.axes._axes import Axes
File "/usr/lib/python2.7/site-packages/matplotlib/axes/_axes.py", line 5, in <module>
from six.moves import reduce, xrange, zip, zip_longest
ImportError: cannot import name zip_longest
>>> import matplotlib
>>> matplotlib.__file__
'/usr/lib/python2.7/site-packages/matplotlib/__init__.pyc'

# pacman -Qo /usr/lib/python2.7/site-packages/matplotlib/__init__.pyc
/usr/lib/python2.7/site-packages/matplotlib/__init__.pyc ist in python2-matplotlib 1.4.3-2 enthalten

# pacman -Qo /usr/lib/python2.7/site-packages/six.pyc
/usr/lib/python2.7/site-packages/six.pyc ist in python2-six 1.9.0-1 enthalten
This task depends upon

Closed by  Doug Newgard (Scimmia)
Thursday, 07 May 2015, 13:11 GMT
Reason for closing:  Not a bug
Additional comments about closing:  User requested: i found the reason. six does sys.modules['six.moves'] = .... If another package provides six as third party tool it overwrites this with old values. So this can be closed as INVALID.
Comment by Doug Newgard (Scimmia) - Thursday, 07 May 2015, 01:15 GMT
What happens when you just do "from six.moves import zip_longest" in python2?

Loading...