Installing and Managing Multiple Versions of Python - macOS Mojave, Catalina, Big Sur

preview_player
Показать описание
In this video, I demonstrate how to install, manage, and easily switch between multiple versions of Python 3 with Homebrew using pyenv on macOS Mojave or older, Catalina, or Big Sur.

My demonstration consists of installing 3 versions of Python 3 as well as the last release of Python 2 which is version 2.7.18.

Please note that, as I mention in the video, it is not really recommended to install older versions of Python 3, but in rare circumstances where you need to use a Python package or library and it is not compatible with the latest release, then you can use pyenv to install and manage multiple versions of Python.

In order to be able to use pyenv, you need to have Homebrew installed. If you don’t, I show exactly how to do that in the following videos:

#datasciencementor #datascience #datascience_tools #python #python3 #python2 #pyenv #multiple_versions_python #macOS
Рекомендации по теме
Комментарии
Автор

I received many comments on my videos on how to install and manage older versions of Python 3. In this video, I show one way of doing that. I hope you find the video helpful. If you have any questions or comments, please feel free to share them here, and I will be more than happy to help out.

TheDataScienceMentor
Автор

Thanks for making this! Very helpful and easy to follow 🎉

LukeHildreth
Автор

Thank you… It made so easy to switch between python versions.
Really helpful… 🙂🙂🙂

mohammadsamishaikh
Автор

Thank you, this really helped me out!

sofiepatoor
Автор

Yes Sir I also need it, thank u sir for your time and hard work and love for us .

rishikumar
Автор

Hi @The Data Science Mentor, I tried following your steps to install Python 3.6.13 and received the following:
IThank you.

tariqr
Автор

After hours of reading ton of google search's result and Stack Overflow answer just for "pygame is not defined". I pause learning python. Instead learning how to manage the version of python, installing package the right way and also control the version of Pip. And finally I'm here after hours!
Really excited to run my python code confidently. I just have a quick question: When we use pyenv global to set python version as default, will it affects on all the projects that I'm doing? For example, I'm using Visual Studio Code. And I select python interpreter for every project that I use. So how's it compared to setting particular python version as default and using pyenv or venv ( create a virtual environment file)? Do you have a video that explain more about setting python? I think I would understand more when try it.
Thank you for your works, sir. Liked and subcribed!

JustinInBlack
Автор

do we need to worry about the config conflicts from brew doctor?

orjihvy
Автор

Ngoc Nguyen
1 second ago
when I insert the command export PATH = "$(pyenv root") / shims: $PATH", I insert export PATH = "$(pyenv root" / shims: $PATH", so I basically miss the ")" in the "$(pyenv root" ", How can I combat to it and add ")" ? Thank you

JustinInBlack
Автор

Tensorflow is exactly why im here lmfao

ryanhandley
Автор

This is a great video for us MacOS users, wish I would have found this when I first started getting into coding. So, I already have both python 3.10 and 3.11 installed on my macbook, but I guess when I did it I followed a pc video and went to the python website and downloaded each tar.xz file. Either way, when I input pyenv versions comd, I get "* system (set by so I tried the python --version and got "zsh: command not found: python". So I then tried python3 --version and got "Python 3.10.11" I'm not sure why it's not showing the 3.11.3 version? I know I'm a little behind the 8 ball as this video is 2 years ago, but I hope you can help me out?

alsadler
Автор

I had python 3 already installed but still wrote the path ? and it is not working can any one guide me after 8:40

sarimkhan
Автор

when I try

pyenv install 3.6.9 got an error

configure: error: Unexpected output of 'arch' on OSX
make: *** No targets specified and no makefile found. Stop.

I am using
mac OS Big sur 11.2.3
M1 chip
ARM
python 3.8.2 and 2.7.12 are already installed

Can you help me please

jatinvamja
Автор

I'm using MacOS Catalina and in my terminal is "%" sign istead of "$" sign. So I just simply replace "$" by "%" in every code that you used in the video? For example: export PATH = "%(pyenv root" / shims: % PATH" for export PATH = "$(pyenv root" / shims: $PATH"?
Thank you

JustinInBlack
Автор

I already have Python3.9 installed on my machine. I want to use pyenv to manage multiple versions esp because of tensorflow incompatibility. Do i need to uninstall 3.9 and then install 3.8 and 3.9 using pyenv. Or is there a way to pyenv existing python version

Also, please create a video for clean and complete uninstall of one or more versions of python.

You are doing job. Thank you.

jaideepadhvaryu
Автор

Excuse me, I have a question I hope you can help me out with. And, please note that I am absolutely new to programming and developing. In exactly TC: 4:13 in this video, you enter ^D.
--- Can you tell me if this command is supposed to close the transaction that had been initiated when you entered "Python"? --
I can see that the next thing that happens is that it takes you straight to
dsmentor: ~ and then you begin typing commands again.

josephgarza
Автор

I am going through the steps but I can only install 3.9 and 3.8 but not 3.7 or any version below. When I check the shims, there is no version below 3.8 there. Any new restrictions by Pyenv? Thanks

yanis
Автор

when I run Vim .zshrc, it show ".zshrc" 1L, 53C, instead of "New File". Why is that?
Thank you

JustinInBlack
Автор

This was helpful however. I had problems with installing python 3.10.10. I ended up using this command: arch -x86_64 pyenv install 3.10.10

ronn_zw
Автор

Well that sure as hell screwed up my python even worse than anaaconda. Think i'll stick to sagemath that actually works. Python is a bag of hurt.

JohnMartin-jxwz