App to Manage Python Versions
I know it’s a well known tool. But having introduced Python many times as go-to method to write codes to automate and for personal uses, I realize now that I didn’t mention the tool to manage Python. Unlike like programming languages, Python has gone through some major changes from versions to versions, most notably from Python 2 to 3.
The tool in question is pyenv. It’s available for all three major OS, free, and open source. Though I only mentioned Python 3 as an example, even in the Python 3, there were some major improvements that are not backward compatible. And with what some might consider as radical changes in Python, I believe tools such as pyenv
became indispensable for Python environment.
There are guidelines as to how to use pyenv
— how to make sense out of all the Python versions scattered on the disk. My goto method, as of now, is to let the OS have its version of Python installed and updated. There’s no point in trying to update or remove the system versions, as they are installed and maintained for a different purpose. As a user, I wouldn’t use the system Python. Instead, the one controlled by pyenv
would be called whenever I need to test or run my code.
pyenv
also support all the other implementations, such as PyPy. I prefer to keep things vanilla as possible, so I haven’t had a chance to test out how well it supports non-CPython varieties. Depending on which implementation you are using, the community may have its own designated way to install, update, and maintain the version on the system. But as far as I am aware, commonly used implementations are also using pyenv
as the management tool.