Mac OS uses default 2.x version out of box. To check whether, python has been installed successfully. Try the following command. Python3 -V Python 3.5.0 Above step ensure that Python 3.5 has been installed successfully. This is the high level outline of this post: Mas OS X - Python 3.5 - Virtaulenv - Flask - app.py(first Hello world ). Learning to code is hugely popular at the moment, and Python is a great coding language to learn. Luckily for us, the Mac is a great coding platform, and Python makes it easy to learn how to code.
1. Apple Only Provides Python 2.7 in macOS
Python 2.x is installed in macOS by default. Even macOS 10.13 High Sierra has Python 2.7.4 as its only version.
As the Python website says, “Python 2.x is legacy, Python 3.x is the present and future of the language.” Briefly, in order to move forward technically as a language, the creator, Guido van Rossum, needed to make some significant internal changes. To do this, backwards compatibility had to be compromised. As a result, the 3.x version can’t be depended on to run 2.x scripts.
Python 2 will reach end of life (EOL) in the year 2020..
So should you ever be using 2.7? Not unless you absolutely have to and accept that you’ll have to rewrite your code at some point. In the past, the Python.org site said:
Firstly, if you’re deploying to an environment you don’t control, that may impose a specific version, rather than allowing you a free selection from the available versions.
Secondly, if you want to use a specific third party package or utility that doesn’t yet have a released version that is compatible with Python 3, and porting that package is a non-trivial task, you may choose to use Python 2.7 in order to retain access to that package.
Alternatively, if you’re a newbie to the language and/or your class instructor insists that you begin by learning 3.x, then you’ll need to install it on your Mac. It’s particularly easy to do because 1) There’s an macOS installer package that does all the work and 2) it includes a basic IDE, and 3) you can still run both versions, so there’s no penalty to installing 3.6.x.
2. Where Can I Get Python 3.6.x?
Go to the Python website’s download page. It should auto-detect that you’re on a Mac. You’re probably wanting 3.6.2 (as of August 2017). It’ll look like this:
Python download page.
3. What do I Need to Know Before Installing?
If you’ve already downloaded a previous version of Python 3.x, the installer will create a new directory with new link called Python3.6. You won’t have to delete any other version.
4. Proceeding With the Installation
You’ll be downloading a macOS package file called “python-3.6.2-macosx10.6.pkg” to your downloads folder. (The 10.6 embedded in the file name means you need at least macOS Snow Leopard to run it. That means everything from 10.6 Snow Leopard up to and including 10.13 Sierra.)
When you double-click this file, it will launch the package’s installer, and you’ll see this:
Python’s Installer Package Welcome
There are several steps. Walk through the installer by reading the package notes and agree to the license terms. It will install on your boot drive by default, but you’ll be given a chance to change the install location. Finally click on Install. You’ll be asked for an administrator password because the macOS Library is written to. The install will take only a minute or so.
When the installer is finished, it will have installed Python 3.6 in this directory.
There will be a link to run the Python 3.6 executable here:
The above points to:
Finally, to run Python 3.6 interactively in the shell, type this on the command line:
Python 3.6 in shell
You don’t need to type the full path because it’s already in your shell’s path. (You can see your default paths with > echo $PATH.)
5. How Do I Run the Older 2.7 Version?
To get to the 2.7 version, you can, type on the command line:
6. Using the Basic IDE, Called IDLE, That Came With the Installation
If, in the Finder, you go to /Applications/Python3.6, you’ll find the IDE called IDLE.app. This is a macOS app. If you don’t want to work on the command line, you can use this IDE to write and save your code. Documentation is found under the Help menu “IDLE Help.”
First launch the IDLE app. It will launch in the shell. Then, to get to the edit window in IDLE, go to the app’s menu bar, and select File > New. Here’s the start of some new code, partially written.
The IDLE edit window.
Also, in the /Applications/Python3.6 folder is a file called ReadMe.rtf. You should read that.
7. Where Can I Learn More?
There is a boatload of friendly information about Python at their website. It’s a beautifully laid out site.
If you’re in a learning mode, here are some good books:
1. Absolute beginner with with programming a computer. “Python Programming” by Michael Dawson.
2. For those who know a little programming. “Python Programming” by John Zelle.
3. For experienced programmers who want to learn Python. “Learning Python” by Mark Lutz. This book covers both 2.x and 3.x.
Download Python 3.6.2 Latest
Download Python 3.6.2 Latest Version –Python 3.6.2 is a dynamic object-oriented programs language that can be made use of for several sort of software program development. It supplies strong assistance for combination with various other languages and also devices, features extensive common collections, and also can be learned in a couple of days. Lots of Python designers report significant productivity gains and really feel the language encourages the development of better, even more maintainable code.
Python 3.6.2 operate on Windows, Linux/Unix, Mac OS X, OS/2, Amiga, Palm Handhelds, as well as Nokia smart phones. Python has also been ported to the Java and.NET digital machines. Python 3.6.2 is distributed under an OSI-approved open source permit that makes it free to use, also for business products.
Some of its crucial distinguishing features include:
Very clear, understandable phrase structure
Strong self-questioning capacities
Intuitive object alignment
All-natural expression of step-by-step code
Complete modularity, supporting ordered packages
Exception-based mistake handling
Really high level vibrant data kinds
Considerable conventional collections and third party modules for essentially every task
Extensions as well as modules conveniently written in C, C++ (or Java for Jython, or.NET languages for IronPython).
Embeddable within applications as a scripting interface.
How To Download Python 3.5 For Mac
Requirements : Windows XP / Vista / Windows 7 / Windows 8 / Windows 8.1 / Windows 10/ Mac OS
Latest Version : Python 3.6.2
Name : Python
Size : 20.09MB
Download Python 3.6.2 Latest Version
Supported versions
Download
Python 3.6.2 For Windows XP / Vista / Windows 7
Download
Python 3.6.2 For Windows 8 / Windows 8.1 / Windows 10/