Installing Python 3 on Mac OS: Difference between revisions

From Littledamien Wiki
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
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
[[Category:Python]] [[Category:Web Development]]
== Install with `pyenv` ==
 
Install/update `pyenv`. <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</ref>
 
<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>
 
== 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 a installer package as opposed to something that can be installed on the command line.  
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 10: Line 31:
''(The installer doesn't require admin privileges.)''
''(The installer doesn't require admin privileges.)''


== See also ==
=== Links ===
See [[Python Virtual Environments]] for running Python 3.
See [[Python Virtual Environments]] for running Python 3.
=== References ===
<references />
[[Category:Python]] [[Category:Web Development]]

Latest revision as of 18:50, 29 April 2022

Install with pyenv[edit]

Install/update pyenv. [1]

$ 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

Legacy article content[edit]

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 also[edit]

Links[edit]

See Python Virtual Environments for running Python 3.

References[edit]