Matplotlib fails to install pyparsing with Python 2 #1792

Closed
astrofrog opened this Issue Feb 27, 2013 · 3 comments

Comments

Projects
None yet
2 participants
@astrofrog
Contributor

astrofrog commented Feb 27, 2013

If I try and install Matplotlib 0c6f12a, pyparsing fails to install on Python 2:

Installed /Users/tom/Library/Python/2.7/lib/python/site-packages/matplotlib-1.3.x-py2.7-macosx-10.6-x86_64.egg
Processing dependencies for matplotlib==1.3.x
Searching for pyparsing>=1.5.6
Reading http://pypi.python.org/simple/pyparsing/
Reading http://pyparsing.wikispaces.com/
Reading http://sourceforge.net/project/showfiles.php?group_id=97203
Reading http://pyparsing.sourceforge.net/
Reading http://sourceforge.net/projects/pyparsing
Best match: pyparsing 2.0.0
Downloading http://pypi.python.org/packages/source/p/pyparsing/pyparsing-2.0.0.zip#md5=f9bc56d9f6c977085001db49a63d7bb9
Processing pyparsing-2.0.0.zip
Writing /var/folders/8L/8L-R-5PbEh0ef6pKH-3E5k+++TI/-Tmp-/easy_install-VocUxa/pyparsing-2.0.0/setup.cfg
Running pyparsing-2.0.0/setup.py -q bdist_egg --dist-dir /var/folders/8L/8L-R-5PbEh0ef6pKH-3E5k+++TI/-Tmp-/easy_install-VocUxa/pyparsing-2.0.0/egg-dist-tmp-XdiKmp
SyntaxError: ('invalid syntax', ('build/bdist.macosx-10.6-x86_64/egg/pyparsing.py', 629, 22, '        nonlocal limit,foundArity\n'))

zip_safe flag not set; analyzing archive contents...
SyntaxError: ('invalid syntax', ('/Users/tom/Library/Python/2.7/lib/python/site-packages/pyparsing-1.5.3-py2.7.egg/pyparsing.py', 629, 22, '        nonlocal limit,foundArity\n'))

Adding pyparsing 1.5.3 to easy-install.pth file

Installed /Users/tom/Library/Python/2.7/lib/python/site-packages/pyparsing-1.5.3-py2.7.egg
error: Could not find required distribution pyparsing>=1.5.6

this is because pyparsing 2.0.0 is not Python 2-compatible. The fix in my case is to install pyparsing manually:

pip-2.7 install pyparsing==1.5.6 --upgrade --user

but this should really work out of the box.

@pelson

This comment has been minimized.

Show comment Hide comment
@pelson

pelson Feb 27, 2013

Member

Hmm. Sounds like a problem with pip to me. Should running pip with python2 really try installing a python3 only package?

but this should really work out of the box.

Agreed. pip problem or no - we're still going to have to deal with it in the short term.

Member

pelson commented Feb 27, 2013

Hmm. Sounds like a problem with pip to me. Should running pip with python2 really try installing a python3 only package?

but this should really work out of the box.

Agreed. pip problem or no - we're still going to have to deal with it in the short term.

@astrofrog

This comment has been minimized.

Show comment Hide comment
@astrofrog

astrofrog Feb 27, 2013

Contributor

I've suggested a fix in #1794.

Contributor

astrofrog commented Feb 27, 2013

I've suggested a fix in #1794.

@pelson

This comment has been minimized.

Show comment Hide comment
@pelson

pelson Feb 27, 2013

Member

I agree with your approach in that PR. I'll close this issue.

Member

pelson commented Feb 27, 2013

I agree with your approach in that PR. I'll close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment