Python Installation: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
 
Line 12: Line 12:
</syntaxhighlight>
</syntaxhighlight>


==Multiple Python Versions==
For context around managing multiple Python versions on the same system with <code>brew</code>, see {{Internal|Python_Versions#Python_Version_Management_with_Brew|Python Version Management with Brew}}
<syntaxhighlight lang='bash'>
brew install python@3.7
</syntaxhighlight>
 
Installs in <code>/usr/local/Cellar/python@3.7</code> while preserving the current <code>/usr/local/Cellar/python@3.9</code>.
 
This version is not symlinked in <code>/usr/local/bin</code>. To use it:
<syntaxhighlight lang='bash'>
export PATH="/usr/local/opt/python@3.7/bin:${PATH}"
</syntaxhighlight>


=Linux=
=Linux=

Latest revision as of 21:53, 2 November 2023

External

Internal

Mac

brew install python3

For context around managing multiple Python versions on the same system with brew, see

Python Version Management with Brew

Linux

yum install python3