I will start with an example that will demonstrate how
pyenv works, and when you’re following along, you might not want to run these commands just yet because I will show you an even easier command to remove Python versions after this.
As mentioned before,
pyenv works by building Python from source, and each version that you have installed is located nicely in your
pyenv root directory. As you can see, I have already installed a couple of versions before this course, which I use for several projects I’m currently working on.
Now that you have seen where
pyenv stores the Python versions and you’ve learned the hard way to remove them, I’ve re-installed Python 2.7.15 and cleared my terminal to show you a much easier way to uninstall a Python version. When you are following along, this will be a good point to continue.
As you might have noticed by now, you’re still using
system Python by default. This will also be confirmed when you run
python -v or when you have a look at which Python version you’re currently using.
Become a Member to join the conversation.