Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Matplotlib fails to install pyparsing with Python 2 #1792

Closed
astrofrog opened this Issue · 3 comments

2 participants

@astrofrog

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
Collaborator

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

I've suggested a fix in #1794.

@pelson
Collaborator

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

@pelson pelson closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.