Message287247
> - 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). |
|
Date |
User |
Action |
Args |
2017-02-07 16:19:18 | paul.moore | set | recipients:
+ paul.moore, tim.golden, zach.ware, eryksun, steve.dower, wdhwg001, ricpol |
2017-02-07 16:19:18 | paul.moore | set | messageid: <1486484358.43.0.990126875847.issue28686@psf.upfronthosting.co.za> |
2017-02-07 16:19:18 | paul.moore | link | issue28686 messages |
2017-02-07 16:19:18 | paul.moore | create | |
|