This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author chris.jerdonek
Recipients Arfrever, chris.jerdonek, christian.heimes, docs@python, ezio.melotti, loewis, ncoghlan, vstinner
Date 2012-09-24.03:37:45
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1348457867.8.0.44835254467.issue15964@psf.upfronthosting.co.za>
In-reply-to
Content
> So can you find out why asdl_c.py actually printed this error?

I collected some additional information.  Here is the beginning of Parser/asdl_c.py:

#! /usr/bin/env python
"""Generate C code from an ASDL description."""

And in the scenario of this issue I have--

$ python
-bash: /opt/local/Library/Frameworks/Python.framework/Versions/Current/bin/python: No such file or directory

But--

$ /usr/bin/env python -V
Python 3.2.3

Some more data:

$ /usr/bin/env python -c "import sys; print(sys.executable)"
/opt/local/Library/Frameworks/Python.framework/Versions/3.2/Resources/Python.app/Contents/MacOS/Python
$ echo $PATH
/opt/local/Library/Frameworks/Python.framework/Versions/Current/bin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/local/git/bin:/usr/texbin
$ which python
/opt/local/bin/python
$ /opt/local/bin/python -c "import sys; print(sys.executable)"
/opt/local/Library/Frameworks/Python.framework/Versions/3.2/Resources/Python.app/Contents/MacOS/Python

It's not immediately clear to me why running `python` doesn't find python in the second $PATH entry even though `which python` does.  Also, creating a new terminal doesn't seem to exhibit the same problem, so the error state may not be fully reproducible after all (at least on my machine).

In any case, Christian's work-around does resolve the issue for this particular error state while other solutions don't.
History
Date User Action Args
2012-09-24 03:37:48chris.jerdoneksetrecipients: + chris.jerdonek, loewis, ncoghlan, vstinner, christian.heimes, ezio.melotti, Arfrever, docs@python
2012-09-24 03:37:47chris.jerdoneksetmessageid: <1348457867.8.0.44835254467.issue15964@psf.upfronthosting.co.za>
2012-09-24 03:37:47chris.jerdoneklinkissue15964 messages
2012-09-24 03:37:45chris.jerdonekcreate