4 ms·
Telling people to apt-get or brew install python isn’t good advice. It’s best to use something like pyenv so an upgrade doesn’t get rid of the version of python
by postpawl 5y ago
Telling people to apt-get or brew install python isn’t good advice. It’s best to use something like pyenv so an upgrade doesn’t get rid of the version of python you were relying on.
- atoav 5y agoExactly. Always, always create a virtual environment of some sorts for your python projects, unless you don't use external dependecies at all. I ended up using poetry in the end.
- NoThisIsMe 5y agoYes, that too, but GP isn't talking about virtual environments.
- mescaline 5y agoOr just run it in a container!
- atoav 5y agoPoetry wins over a container because you have better version control (minimum/maximum specs as per your pyproject.toml file) and makes sure your users get the same build (as per poetry.lock). Additionally if what you are building is a library, then a container won't fly as you (to my knowledge) cannot publish these to pypi (to make them installable via pip install foo)
- LtWorf_ 5y agoThe trick is to not rely on a specific version of python, because they do go EOL and stop receiving fixes.
- pech0rin 5y agoThats not a trick, every version of software eventually reaches EOL. Thats why there is semantic versioning, etc. What do you think happens when security vulnerabilities are found in a version of software. Your comment is meaningless.
- Doxin 5y agoI'd be careful recommending pyenv to beginners too. I've seen it turn an interns system python install to absolute mush. Took some real doing to finally get pyenv unhooked from the system and everything back in working order.