Python may be installed on your Mac already: you can test this out by opening Terminal and entering python -version. If it's not, you should make your way to the Python website and click the. So before installing Python packages with Homebrew, the default Python is installed in /usr/bin which is shipped with your macOS (e.g. Python 2.7.10 on High Sierra). Any versions found in /usr/local (such as /usr/local/bin) are provided by external packages. It is generally advised, that when working with multiple versions, for Python 2 you may use python2 / pip2 command, respectively for Python 3 you can use. Mac OS X comes with Python 2.7 out of the box. You do not need to install or configure anything else to use Python 2. These instructions document the installation of Python 3. The version of Python that ships with OS X is great for learning, but it’s not good for development. Python comes pre-installed on macOS. The Apple-provided Python Framework is installed in /System/Library/Frameworks/Python.framework. You can find several symlinks in the usr/bin/python directory. You shouldn’t attempt to remove the pre-installed version of Python provided by Apple, as this may cause your operating system to malfunction.
Mac OS 下安装Python并配置环境变量 1、下载Python. 访问Python官方网站 https://www.python.org/.
Stable Releases
- Python 2.7.8 - July 2, 2014
- Download Mac OS X 32-bit i386/PPC installer
- Download Mac OS X 64-bit/32-bit installer
- Python 2.7.7 - June 1, 2014
- Download Mac OS X 32-bit i386/PPC installer
- Download Mac OS X 64-bit/32-bit installer
- Python 3.4.1 - May 19, 2014
- Download Mac OS X 32-bit i386/PPC installer
- Download Mac OS X 64-bit/32-bit installer
- Python 3.4.0 - March 17, 2014
- Download Mac OS X 32-bit i386/PPC installer
- Download Mac OS X 64-bit/32-bit installer
- Python 3.3.5 - March 9, 2014
- Download Mac OS X 32-bit i386/PPC installer
- Download Mac OS X 64-bit/32-bit installer
- Python 3.3.4 - Feb. 9, 2014
- Download Mac OS X 32-bit i386/PPC Installer
- Download Mac OS X 64-bit/32-bit Installer
- Python 3.3.3 - Nov. 17, 2013
- Download Mac OS X 32-bit i386/PPC installer
- Download Mac OS X 64-bit/32-bit installer
- Python 2.7.6 - Nov. 10, 2013
- Download Mac OS X 32-bit i386/PPC Installer
- Download Mac OS X 64-bit/32-bit x86-64/i386 Installer
- Python 2.6.9 - Oct. 29, 2013
- No files for this release.
- Python 3.2.5 - May 15, 2013
- Download Mac OS X 32-bit i386/PPC installer
- Download Mac OS X 64-bit/32-bit installer
- Python 3.3.2 - May 15, 2013
- Download Mac OS X 32-bit i386/PPC installer
- Download Mac OS X 64-bit/32-bit installer
- Python 2.7.5 - May 12, 2013
- Download Mac OS X 32-bit i386/PPC installer
- Download Mac OS X 64-bit/32-bit installer
- Python 2.7.4 - April 6, 2013
- Download Mac OS X 32-bit i386/PPC installer
- Download Mac OS X 64-bit/32-bit installer
- Python 3.2.4 - April 6, 2013
- Download Mac OS X 32-bit i386/PPC installer
- Download Mac OS X 64-bit/32-bit installer
- Python 3.3.1 - April 6, 2013
- Download Mac OS X 32-bit i386/PPC installer
- Download Mac OS X 64-bit/32-bit installer
- Python 3.3.0 - Sept. 29, 2012
- Download Mac OS X 32-bit i386/PPC installer
- Download Mac OS X 64-bit/32-bit installer
- Python 2.6.8 - April 10, 2012
- No files for this release.
- Python 3.2.3 - April 10, 2012
- Download Mac OS X 32-bit i386/PPC installer
- Download Mac OS X 64-bit/32-bit installer
- Python 3.1.5 - April 9, 2012
- No files for this release.
- Python 2.7.3 - April 9, 2012
- Download Mac OS X 32-bit i386/PPC installer
- Download Mac OS X 64-bit/32-bit installer
- Python 3.2.2 - Sept. 3, 2011
- Download Mac OS X 32-bit i386/PPC installer
- Download Mac OS X 64-bit/32-bit installer
- Python 3.2.1 - July 9, 2011
- Download Mac OS X 32-bit i386/PPC installer
- Download Mac OS X 64-bit/32-bit installer
- Python 2.7.2 - June 11, 2011
- Download Mac OS X 32-bit i386/PPC installer
- Download Mac OS X 64-bit/32-bit installer
- Python 3.1.4 - June 11, 2011
- Download Mac OS X 32-bit i386/PPC installer
- Python 2.6.7 - June 3, 2011
- No files for this release.
- Python 2.5.6 - May 26, 2011
- No files for this release.
- Python 3.2.0 - Feb. 20, 2011
- Download Mac OS X 32-bit i386/PPC installer
- Download Mac OS X 64-bit/32-bit installer
- Python 2.7.1 - Nov. 27, 2010
- Download Mac OS X 32-bit i386/PPC installer
- Download Mac OS X 64-bit/32-bit installer
- Python 3.1.3 - Nov. 27, 2010
- Download Mac OS X 32-bit i386/PPC installer
- Python 2.6.6 - Aug. 24, 2010
- Download Mac OS X 32-bit i386/PPC installer
- Python 2.7.0 - July 3, 2010
- Download Mac OS X 32-bit i386/PPC installer
- Python 3.1.2 - March 20, 2010
- Download Mac OS X installer
- Python 2.6.5 - March 18, 2010
- Download Mac OS X installer
- Python 2.5.5 - Jan. 31, 2010
- No files for this release.
- Python 2.6.4 - Oct. 26, 2009
- Download Mac OS X installer
- Python 2.6.3 - Oct. 2, 2009
- Download Mac OS X installer
- Python 3.1.1 - Aug. 17, 2009
- Download Mac OS X installer
- Python 3.1.0 - June 26, 2009
- Download Mac OS X installer
- Python 2.6.2 - April 14, 2009
- Download Mac OS X installer
- Python 3.0.1 - Feb. 13, 2009
- Download Mac OS X installer
- Python 2.5.4 - Dec. 23, 2008
- Download Mac OS X installer
- Python 2.4.6 - Dec. 19, 2008
- No files for this release.
- Python 2.5.3 - Dec. 19, 2008
- Download Mac OS X installer
- Python 2.6.1 - Dec. 4, 2008
- Download Mac OS X installer
- Python 3.0.0 - Dec. 3, 2008
- No files for this release.
- Python 2.6.0 - Oct. 2, 2008
- Download Mac OS X installer
- Python 2.3.7 - March 11, 2008
- No files for this release.
- Python 2.4.5 - March 11, 2008
- No files for this release.
- Python 2.5.2 - Feb. 21, 2008
- Download Mac OS X installer
- Python 2.5.1 - April 19, 2007
- Download Mac OS X installer
- Python 2.3.6 - Nov. 1, 2006
- No files for this release.
- Python 2.4.4 - Oct. 18, 2006
- Download Mac OS X installer
- Python 2.5.0 - Sept. 19, 2006
- Download Mac OS X installer
- Python 2.4.3 - April 15, 2006
- No files for this release.
- Python 2.4.2 - Sept. 27, 2005
- No files for this release.
- Python 2.4.1 - March 30, 2005
- No files for this release.
- Python 2.3.5 - Feb. 8, 2005
- No files for this release.
- Python 2.4.0 - Nov. 30, 2004
- No files for this release.
- Python 2.3.4 - May 27, 2004
- No files for this release.
- Python 2.3.3 - Dec. 19, 2003
- No files for this release.
- Python 2.3.2 - Oct. 3, 2003
- No files for this release.
- Python 2.3.1 - Sept. 23, 2003
- No files for this release.
- Python 2.3.0 - July 29, 2003
- No files for this release.
- Python 2.2.3 - May 30, 2003
- No files for this release.
- Python 2.2.2 - Oct. 14, 2002
- No files for this release.
- Python 2.2.1 - April 10, 2002
- No files for this release.
- Python 2.1.3 - April 9, 2002
- No files for this release.
- Python 2.2.0 - Dec. 21, 2001
- No files for this release.
- Python 2.0.1 - June 22, 2001
- No files for this release.
Pre-releases
- Python 2.7.7rc1 - May 17, 2014
- Download Mac OS X 32-bit i386/PPC installer
- Download Mac OS X 64-bit/32-bit installer
- Python 3.4.1rc1 - May 5, 2014
- Download Mac OS X 32-bit i386/PPC installer
- Download Mac OS X 64-bit/32-bit installer
- Python 3.4.0rc3 - March 10, 2014
- Download Mac OS X 32-bit i386/PPC installer
- Download Mac OS X 64-bit/32-bit installer
- Python 3.3.5rc2 - March 2, 2014
- Download Mac OS X 32-bit i386/PPC installer
- Download Mac OS X 64-bit/32-bit installer
- Python 3.3.5rc1 - Feb. 23, 2014
- Download Mac OS X 32-bit i386/PPC Installer
- Download Mac OS X 64-bit/32-bit Installer
- Python 3.3.5rc1 - Feb. 23, 2014
- Download Mac OS X 32-bit i386/PPC installer
- Download Mac OS X 64-bit/32-bit installer
Mac OS X comes with Python 2.7 out of the box.
How To Use Python On Mac
You do not need to install or configure anything else to use Python 2. Theseinstructions document the installation of Python 3.
The version of Python that ships with OS X is great for learning, but it’s notgood for development. The version shipped with OS X may be out of date from theofficial current Python release,which is considered the stable production version.
Doing it Right¶
Let’s install a real version of Python.
Before installing Python, you’ll need to install GCC. GCC can be obtainedby downloading Xcode, the smallerCommand Line Tools (must have anApple account) or the even smaller OSX-GCC-Installerpackage.
Note
If you already have Xcode installed, do not install OSX-GCC-Installer.In combination, the software can cause issues that are difficult todiagnose.
Note
If you perform a fresh install of Xcode, you will also need to add thecommandline tools by running
xcode-select--install
on the terminal.While OS X comes with a large number of Unix utilities, those familiar withLinux systems will notice one key component missing: a package manager.Homebrew fills this void.
To install Homebrew, open
Terminal
oryour favorite OS X terminal emulator and runThe script will explain what changes it will make and prompt you before theinstallation begins.Once you’ve installed Homebrew, insert the Homebrew directory at the topof your
PATH
environment variable. You can do this by adding the followingline at the bottom of your ~/.profile
fileIf you have OS X 10.12 (Sierra) or older use this line instead
Femmage fighter mac os. Now, we can install Python 3:
This will take a minute or two.
Pip¶
Homebrew installs
pip
pointing to the Homebrew’d Python 3 for you.Working with Python 3¶
At this point, you have the system Python 2.7 available, potentially theHomebrew version of Python 2 installed, and the Homebrewversion of Python 3 as well.
will launch the Homebrew-installed Python 3 interpreter.
![Mac Mac](https://img.itch.zone/aW1hZ2UvMjUyNjc1LzEyMTI4NTIucG5n/original/FI0Sb7.png)
will launch the Homebrew-installed Python 2 interpreter (if any).
will launch the Homebrew-installed Python 3 interpreter.
If the Homebrew version of Python 2 is installed then
pip2
will point to Python 2.If the Homebrew version of Python 3 is installed then pip
will point to Python 3.Phytonaut Mac Os Download
The rest of the guide will assume that
python
references Python 3.Pipenv & Virtual Environments¶
The next step is to install Pipenv, so you can install dependencies and manage virtual environments.
A Virtual Environment is a tool to keep the dependencies required by different projectsin separate places, by creating virtual Python environments for them. It solves the“Project X depends on version 1.x but, Project Y needs 4.x” dilemma, and keepsyour global site-packages directory clean and manageable. Game jam escape mac os.
For example, you can work on a project which requires Django 1.10 while alsomaintaining a project which requires Django 1.8.
So, onward! Power sphere (fogsight) mac os. To the Pipenv & Virtual Environments docs!
This page is a remixed version of another guide,which is available under the same license.