Installing Python 3 on Mac OS: Difference between revisions
Jump to navigation
Jump to search
(Created page with "Category:Python Category:Web Development As of 2016, Macs come with Python 2.7.x installed. The python installer for Mac OS is a installer package as opposed to some...") |
No edit summary |
||
| Line 1: | Line 1: | ||
[ | == Install with `pyenv` == | ||
Install/update `pyenv`. | |||
<syntaxhighlight lang="bash"> | |||
$ brew install pyenv | |||
</syntaxhighlight> | |||
Install a version of python. `pyenv install --list` for a list of available versions. | |||
<syntaxhighlight lang="bash"> | |||
$ pyenv install 3.9.1 | |||
</syntaxhighlight> | |||
Set the default version of python. | |||
<syntaxhighlight lang="bash"> | |||
$ pyenv global 3.9.1 | |||
</syntaxhighlight> | |||
<ref>[https://opensource.com/article/19/5/python-3-default-mac The Right and Wrong Way To Set Python 3 as a Default on a Mac] - opensource.com | |||
== Legacy article content == | |||
As of 2016, Macs come with Python 2.7.x installed. | As of 2016, Macs come with Python 2.7.x installed. | ||
The python installer for Mac OS is | The python installer for Mac OS is an installer package as opposed to something that can be installed on the command line. | ||
Search for "Install Python 3" to find the [https://www.python.org/downloads/ Python download page]. | Search for "Install Python 3" to find the [https://www.python.org/downloads/ Python download page]. | ||
| Line 11: | Line 34: | ||
See [[Python Virtual Environments]] for running Python 3. | See [[Python Virtual Environments]] for running Python 3. | ||
[[Category:Python]] [[Category:Web Development]] | |||
Revision as of 18:48, 29 April 2022
Install with pyenv
Install/update pyenv.
$ brew install pyenv
Install a version of python. pyenv install --list for a list of available versions.
$ pyenv install 3.9.1
Set the default version of python.
$ pyenv global 3.9.1
<ref>The Right and Wrong Way To Set Python 3 as a Default on a Mac - opensource.com
Legacy article content
As of 2016, Macs come with Python 2.7.x installed.
The python installer for Mac OS is an installer package as opposed to something that can be installed on the command line.
Search for "Install Python 3" to find the Python download page.
Download the 64-bit Python installer package for Mac OS.
(The installer doesn't require admin privileges.)
See Python Virtual Environments for running Python 3.