Re:My Python Development Environment, 2020 Edition
by philwelch on Tuesday November 12, 2019 @01:24AM
(#21511959)
Sometimes scripts will want to invoke Python as ‘python’ and it’s easier to use pyenv to set $PATH overrides.
[ Parent
| on HN ]
Re:My Python Development Environment, 2020 Edition
by japhyr on Tuesday November 12, 2019 @02:43AM
(#21512267)
Thank you, that’s the first concrete reason I’ve heard. It also explains why I haven’t run into issues yet using my own aliases.
Re:My Python Development Environment, 2020 Edition
by heavenlyblue on Tuesday November 12, 2019 @02:30AM
(#21512214)
Why do you need pyenv to set PATH?
Re:My Python Development Environment, 2020 Edition
by philwelch on Tuesday November 12, 2019 @02:41AM
(#21512258)
Maybe you don’t, but it’s a way of doing it.
Specifically, pyenv will dynamically and programmatically link the $PATH for the Python executables (python, pip, etc.) to the desired version as defined either by an environment variable or by the contents of a .python-version file in CWD or an ancestor thereof. The .python-version file can be checked into version control.