Python Mac Os X


And I remembered that osx has an builtin version of python. I tried using type -a python and the result returned. Python is /usr/bin/python python is /usr/local/bin/python However running both python at these locations give me GCC 4.2.1 (Apple Inc. Build 5646) on darwin. Do they both refer to the same builtin python mac provided? May 12, 2019 The official home of the Python Programming Language. While JavaScript is not essential for this website, your interaction with the content will be limited. A BLE abstraction layer for Python inspired by bleat.Currently only supports Linux, with experimental support for Mac OS X. Current Support. Discovering devices. This article will help you to set up a Python virtual environment on Mac OS or your Macbook.If you are a Mac user, you should know that Python 2.7.x comes pre-installed in your Macbook, but as that is required by your operating system, so you cannot modify it or update it and I would recommend that you don't use it at all.

Download Python Mac Os X

Install Miniconda Python¶

There is a known issue with version 3.7 of Anaconda Python and certain versions ofthe Mac OSX operating system. We strongly recommend that you use python 3.6 on OSXto avoid any problems. To install python 3.6, please follow the steps below:

  1. To get started you need to download the OSX minicondainstaller.

    1. Click on the link https: todownload the Python 3.6 installer.

    2. Wait for it to download. It will place a file in your downloadsfolder. On my computer using Safari this is ~/Downloads

  2. Open a Terminal window. If you don’t know how to do this click *Applications -> Utilities -> Terminal*

  3. Within the Terminal change directories into the folder where your downloaded file lives, i.e.

  4. Now run the bash “shell” program to install Miniconda

  5. Scroll through the license (press the space bar to move throughquickly), type ‘yes’ to approve the terms, and then accept all theinstallation defaults.

  6. Close the Terminal program. Then, restart it.

  7. Within the Terminal type:

    1. Enter y at the Proceed prompt.

    2. When the installation completes, close the Terminal window.

Install Spyder IDE and Connect It to Miniconda Python¶

The second half of the installation is the Spyder IDE developmentenvironment. This is the software that you use to write, edit andtest your Python programs. Spyder IDE calls Python to actually run theprogram. Spyder is included by default in the Anaconda Python distribution,which comes with everything you need to get started in an all-in-one package.

However, with Miniconda, we have to download and install Spyder IDE.

  1. Go to the Terminal window.

  2. Type the following command:

    1. This will take some time to download.

    2. When the following prompt appears:

    3. Type y, and hit enter.

  3. Once the download is finished, type the following command to know the locationof Spyder:

    It is usually installed in the bin folder within miniconda3

  4. To start Spyder, go to a terminal window and enter

Detecting 64-bits versus 32-bits Mac OS X Systems¶

You are running 64-bit Mac OS X.

Technically, all Apple computers purchased since Q4 2006 have been equipped with64-bit capable processors. The Mac OS X operating system has supported 64-bit bydefault since OS X 10.6 Snow Leopard, released in 2009. The upgrade to the latestoperating system for your computer is available for free, directly from Apple,since the release of OS X 10.9 Mavericks in 2013.


Check out our guide for installing Python 3 on OS X.

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. Having saidthat, I would strongly recommend that you install the tools and librariesdescribed in the next section before you start building Python applications forreal-world use. In particular, you should always install Setuptools, as it makesit much easier for you to install and manage other third-party Python libraries.

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 a C compiler. The fastest wayis to install the Xcode Command Line Tools by runningxcode-select--install. You can also download the full version ofXcode from the Mac App Store, or theminimal but unofficialOSX-GCC-Installerpackage.


Python On Mac Os X

If you already have Xcode installed, do not install OSX-GCC-Installer.In combination, the software can cause issues that are difficult todiagnose.


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 decent package manager.Homebrew fills this void.

To install Homebrew, open Terminal oryour favorite OS X terminal emulator and run

The 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 file

Now, we can install Python 2.7:

Because [email protected] is a “keg”, we need to update our PATH again, to point at our new installation:

Homebrew names the executable python2 so that you can still run the system Python via the executable python.

Setuptools & Pip¶

Homebrew installs Setuptools and pip for you.

Python Mac Os X

Setuptools enables you to download and install any compliant Pythonsoftware over a network (usually the Internet) with a single command(easy_install). It also enables you to add this network installationcapability to your own Python software with very little work.

pip is a tool for easily installing and managing Python packages,that is recommended over easy_install. It is superior to easy_installin several ways,and is actively maintained.

Virtual Environments¶

Python Download Mac Os X

A Virtual Environment (commonly referred to as a ‘virtualenv’) 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.

Python Mac Os X Framework

For example, you can work on a project which requires Django 1.10 while alsomaintaining a project which requires Django 1.8.

Mac Os X Python 3

To start using this and see more information: Virtual Environments docs.

Update Python On Mac Os X

This page is a remixed version of another guide,which is available under the same license.