Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Problem in installing and configuring latest python 3.8 on MacOS

I've been trying to install Python 3.8 on MacOS via homebrew but I ended up with many versions of Python.

$ which python3
$ /Library/Frameworks/Python.framework/Versions/3.6/bin/python3

$ cd /Library/Frameworks/Python.framework/Versions
$ ls
$ 3.6   3.8

How do I fix it so that I get 3.8 to be the default python version?

like image 593
GeorgeT Avatar asked Sep 25 '26 04:09

GeorgeT


1 Answers

As far as I can tell, currently we are still working on moving to Python 3.8 (too many Homebrew formula dependencies and Jenkins CI often runs out of the disk space).

Here is mega issue tracker: Github python 3.8 migration issue.

For the time being, I would recommend to use pyenv, which I am using it to manage multiple python versions myself for development as well.

Here is what you need to do:

  • brew install pyenv
  • pyenv init
  • eval "$(pyenv init -)" # be sure echo 'eval "$(pyenv init -)"' > ~/.bash_profile for the future shell sessions.
  • pyenv install 3.8.0
  • pyenv global 3.8.0

And then you are good to go.

like image 51
chenrui Avatar answered Sep 27 '26 20:09

chenrui