Linux
Install Python in Linux OS systems
Pyenv builds Python from source, which means you’ll need build dependencies to actually use it. The build dependencies vary by platform. If you are on Ubuntu/Debian and want to install the build dependencies, you could use the following:
After you’ve installed the build dependencies, you’re ready to install pyenv
itself. We recommend using the pyenv-installer project:
At the end of the installation you will see something similar to:
Follow the instructions that will appear to add the paths to your /.bashrc file and then start a new shell session.:
This command will show a list of Python versions:
Now let's install the latest Python version (3.8.5 as of this writing):
Now that Python 3 is installed through pyenv, we want to set it as our global default version for pyenv environments:
Run this command to see the system Python's version after the change:
Sources:
Last updated