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

Matplotlib fails to install pyparsing with Python 2 #1792

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

Matplotlib fails to install pyparsing with Python 2 #1792

astrofrog opened this issue Feb 27, 2013 · 3 comments

Comments

@astrofrog
Copy link
Contributor

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
Copy link
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
Copy link
Contributor Author

I've suggested a fix in #1794.

@pelson
Copy link
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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants