Python 3.6 5 Mac Download
Installing Python three on Mac OS X¶
Mac OS X comes with Python 2.seven out of the box.
You practice non need to install or configure anything else to employ Python 2. These instructions document the installation of Python 3.
The version of Python that ships with Bone Ten is great for learning, just it's not good for development. The version shipped with OS X may be out of date from the official electric current Python release, which is considered the stable production version.
Doing it Correct¶
Let'south install a real version of Python.
Before installing Python, you'll need to install GCC. GCC can be obtained by downloading Xcode, the smaller Command Line Tools (must have an Apple business relationship) or the fifty-fifty smaller OSX-GCC-Installer package.
Note
If y'all already have Xcode installed, do not install OSX-GCC-Installer. In combination, the software can cause issues that are hard to diagnose.
Note
If you perform a fresh install of Xcode, yous will also need to add the commandline tools past running xcode-select --install on the terminal.
While Bone X comes with a large number of Unix utilities, those familiar with Linux systems will find one key component missing: a package director. Homebrew fills this void.
To install Homebrew, open Terminal or your favorite OS X terminal emulator and run
$ /bin/fustigate -c " $(scroll -fsSL https://raw.githubusercontent.com/Homebrew/install/primary/install.sh) " The script will explain what changes it will make and prompt y'all before the installation begins. Once yous've installed Homebrew, insert the Homebrew directory at the tiptop of your PATH environment variable. Y'all can do this by adding the following line at the bottom of your ~/.profile file
consign PATH="/usr/local/opt/python/libexec/bin:$PATH" If you take Os Ten 10.12 (Sierra) or older employ this line instead
export PATH=/usr/local/bin:/usr/local/sbin:$PATH Now, we tin install Python 3:
This volition take a infinitesimal or ii.
Pip¶
Homebrew installs pip pointing to the Homebrew'd Python 3 for you.
Working with Python three¶
At this betoken, y'all have the system Python 2.seven bachelor, potentially the Homebrew version of Python 2 installed, and the Homebrew version of Python 3 likewise.
will launch the Homebrew-installed Python three interpreter.
will launch the Homebrew-installed Python 2 interpreter (if any).
volition launch the Homebrew-installed Python 3 interpreter.
If the Homebrew version of Python 2 is installed and then pip2 will point to Python 2. If the Homebrew version of Python 3 is installed then pip will indicate to Python 3.
The rest of the guide will presume that python references Python 3.
# Do I accept a Python 3 installed? $ python --version Python three.7.1 # Success! Pipenv & Virtual Environments¶
The side by side pace is to install Pipenv, so you tin can install dependencies and manage virtual environments.
A Virtual Environment is a tool to keep the dependencies required by different projects in divide places, by creating virtual Python environments for them. It solves the "Project X depends on version ane.10 simply, Project Y needs 4.ten" dilemma, and keeps your global site-packages directory make clean and manageable.
For example, you lot can piece of work on a project which requires Django 1.ten while besides maintaining a projection which requires Django 1.viii.
So, onward! To the Pipenv & Virtual Environments docs!
This folio is a remixed version of another guide, which is bachelor under the same license.
Python 3.6 5 Mac Download
Posted by: newbyfuldn1943.blogspot.com
Post a Comment