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 paul.moore
Recipients eryksun, paul.moore, ricpol, steve.dower, tim.golden, wdhwg001, zach.ware
Date 2017-02-07.16:19:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1486484358.43.0.990126875847.issue28686@psf.upfronthosting.co.za>
In-reply-to
Content
> - when inside a venv (almost always) go 'python' the old way, because 'py' is unreliable here, *unless* you manually check the shebang of your scripts before you execute them. 

No. When inside a venv:

- If you want to use the interactive interpreter, use 'py'.
- If you want to execute a script, use a shebang of #!/usr/bin/env python and then use `py myscript.py`

You should use /usr/bin/python[X[.Y]] shebangs specifically when you want to use the system Python, and bypass venvs. So that's typically for scripts you've installed in your PATH, not for working scripts in your project. You should never use versioned executable names in shebangs with /usr/bin/env.

Your issues seem to come from an insistence on using versioned interpreter names in /usr/bin/env shebangs, which does not work as you expect. (How it actually works is IMO not very helpful, but not easily fixable without shipping versioned executables, which is an entirely different debate which I don't intend to get into here).
History
Date User Action Args
2017-02-07 16:19:18paul.mooresetrecipients: + paul.moore, tim.golden, zach.ware, eryksun, steve.dower, wdhwg001, ricpol
2017-02-07 16:19:18paul.mooresetmessageid: <1486484358.43.0.990126875847.issue28686@psf.upfronthosting.co.za>
2017-02-07 16:19:18paul.moorelinkissue28686 messages
2017-02-07 16:19:18paul.moorecreate