Installing Python 3 on Mac OS: Difference between revisions

From Littledamien Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
Line 1: Line 1:
== Install with `pyenv` ==
== Install with `pyenv` ==


Install/update `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">
<syntaxhighlight lang="bash">
Line 18: Line 18:
$ pyenv global 3.9.1
$ pyenv global 3.9.1
</syntaxhighlight>
</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 ==
== Legacy article content ==
Line 33: 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]]
[[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]