Start Managing Multiple Python Versions With pyenv (Summary)
You can now more easily contribute to a project that wants to support multiple environments. You can also more easily test out the latest and greatest Python versions without having to worry about messing up your development machine, all with a wonderful tool: pyenv
.
You’ve seen how pyenv
can help you:
- Install multiple versions of Python
- Switch between the installed versions
- Use virtual environments with
pyenv
Congratulations, you made it to the end of the course! What’s your #1 takeaway or favorite thing you learned? How are you going to put your newfound skills to use? Leave a comment in the discussion section and let us know.
00:00
Having to deal with multiple Python versions can be a pain when you try to do it only with system Python or package managers, and that is where pyenv
is the tool to help you out.
00:16
Whether you’re working on multiple projects that require different Python versions, you want to work with multiple Python versions in a single project, or just want to try those shiny features of a new Python release, pyenv
is here to help you.
00:36 You will never have to worry about whether you’ve activated the correct virtual environment, because it will be activated for you after running a single one-time command every time you move into your project directory.
00:53
My name is Johan Vergeer. I really hope you enjoyed this course on the great pyenv
tool and you will join us again here on Real Python.
Santosh on April 25, 2021
Quick note that on Ubuntu (I’m actually using PopOS), python-openssl returned a “not able to find package” error. This SO post seemed to provide a workaround stackoverflow.com/questions/64950324/unable-to-locate-package-openssl-dev
Lee Cullip on Jan. 18, 2022
Excellent overview of pyenv, this will make it much easier for me to manage versions now. Thanks!!
Glenn Lehman on Nov. 1, 2022
Nice course. I learned much and at a good pace.
Libis Bueno on Jan. 8, 2023
Very informative, and I was eager to take this course after reading the article but was disappointed to learn that this is only for Mac users. It’s too bad you don’t have a video for windows env. Not everyone uses MAC :(
Bartosz Zaczyński RP Team on Jan. 9, 2023
@Libis Bueno pyenv runs on macOS and Linux, so if you’re on a recent Windows version, then you should be able to run pyenv through WSL. In case you need it, you can learn how to configure WSL in Windows by reading our Windows Coding Setup Guide. Also, we have a regular Office Hours attendee who uses Windows for development, and I’m pretty sure he also uses pyenv. Consider joining one of our sessions on Wednesday if you haven’t already 😉
Libis Bueno on Jan. 9, 2023
Hi Bartosz, I was able to find the Windows Coding Setup and that worked great, a video like the one mentioned would also be very helpful.
Become a Member to join the conversation.
Alan ODannel on April 20, 2021
Very informative course. I’ve been using the Python virtual environments for a while now. Pyenv makes switching between Python versions a breeze. Thank you Johan.