Osx Update Python
- Set up your computer
- Practice
Start here!
Try this 10-minute tutorial. When itloads, type tutorial
and press Enter to start.
Release Date: April 9, 2012 Note: A newer bugfix release, 2.7.4, is currently available.Its use is recommended over previous versions of 2.7. Python 2.7.3 was released on April 9, 2012. 2.7.3 includes fixes for several reported security issues in 2.7.2: issue 13703 (oCERT-2011-003, hash collision denial of service), issue 14234 (CVE-2012-0876, hash table collisions CPU usage DoS. 🙃 A delightful community-driven (with 1800+ contributors) framework for managing your zsh configuration. Includes nearly 300 optional plugins (rails, git, OSX, hub, docker, homebrew, node, php, python, etc), over 140 themes to spice up your morning, and an auto-update tool so that makes it easy to keep up with the latest updates from the community. ohmyzsh/ohmyzsh.
Set up your computer
This is our recommended way to install Python on your system.
Install Anaconda
- Please download the Anaconda installer. We recommend Python 3.
- Choose
Install for me only
- By default, Anaconda will prepend itself to your PATH – leave this as is
- When Anaconda has finished installing, open a terminal (Linux, OSX), or the Anaconda Prompt (Windows)
- Type
conda update conda
, hit enter, and then type 'y' (and hit enter) - Type
conda update anaconda
, hit enter, and then type 'y' (and hit enter)
Run the Jupyter Notebook
With Jupyter, you intersperse code, output, explanatory text, and figures in one big file called a 'notebook.' Notebooks are a convenient format to explore a language and to share examples of code.
- To run a notebook, open the Terminal (Linux, OSX) or Anaconda Prompt (Windows) and type
jupyter notebook
. - The notebook will open a new tab in your default browser. Do not close the terminal, as this will also shutdown the notebook.
- When it has loaded, click on 'New' (at the top right) and then 'Python3' to create a new notebook.
Python 2 vs Python 3
Python 3 (released in 2008) is the newest version of Python, and most featureshave not changed. Most packages have been updated to Python 3 by now (2016).So, if your lab does not have a preference, I recommend using Python 3.
There are a couple key differences for novice programmers:
- In Python 2, you can print with
print 42
orprint(42)
. In Python3, you need to use parentheses, as inprint(42)
. In Python 2, division of two integers like
5/2
will evaluate to2
. (Python will drop the remainder if both numbers are integers.)Python 3 does exact division ('2.5', in this example). If you use Python 2 and do not want this behavior, add this line at the top of each program:from __future__ import division
.
Text editors and IDEs
For creating large projects in Python, we recommend using a text editor in combination with the Jupyter notebook. Popular choices include:
For even larger projects, a well-engineered IDE (Interactive Development Environment) may be better than a text editor. Typically, IDEs include drag-and-drop support for debugging and refactoring. Popular choices include:
Practice
Past topics of the Python Working Group are linked here. Suggestions? Send us an email at dlab-frontdesk@berkeley.edu.
Software Carpentry
These exercises are really useful to get acquainted with Python. Here's a link to the Jupyter notebook version and the webpage version.
Python for Social Sciences
This is a free online book by Jean Mark Gawron. It's free and online at this link.
Resources
Check the Learning Resources page for more learning materials. Others in the community may also have relevant materials.
Mac Update Python
Release Date: April 9, 2012
Note: A newer bugfix release, 2.7.4, is currently available. Its use is recommended over previous versionsof 2.7.
Python 2.7.3 was released on April 9, 2012. 2.7.3 includes fixes for severalreported security issues in 2.7.2: issue 13703 (oCERT-2011-003, hashcollision denial of service), issue 14234 (CVE-2012-0876, hash tablecollisions CPU usage DoS in the expat library), issue 14001 (CVE-2012-0845,SimpleXMLRPCServer denial of service), and issue 13885 (CVE-2011-3389,disabling of the CBC IV attack countermeasure in the _ssl module).
The Python 2.7 series is scheduled to be the last major version in the 2.xseries before 2.x moves into an extended maintenance period. The 2.7 seriescontains many of the features that were first released in Python 3.1.Improvements in this release include:
- An ordered dictionary type
- New unittest features including test skipping, new assert methods, and testdiscovery
- A much faster io module
- Automatic numbering of fields in the str.format() method
- Float repr improvements backported from 3.x
- Tile support for Tkinter
- A backport of the memoryview object from 3.x
- Set literals
- Set and dictionary comprehensions
- Dictionary views
- New syntax for nested with statements
- The sysconfig module
See these resources for further information:
- Change log for this release.
- Report bugs at http://bugs.python.org.
- Help fund Python and its community.
This is a production release. Please report any bugsyou encounter.
We currently support these formats for download:
- Mac OS X 64-bit/32-bit x86-64/i386 Installer (2.7.3) for Mac OS X 10.6 and 10.7[2](sig).[You may need an updated Tcl/Tk install to run IDLE or use Tkinter,see note 2 for instructions.]
- Mac OS X 32-bit i386/PPC Installer (2.7.3) for Mac OS X 10.3 through 10.6[2](sig).
The source tarballs are signed with Benjamin Peterson's key (fingerprint: 12EF3DC3 8047 DA38 2D18 A5B9 99CD EA9D A413 5B38). The Windows installer was signedby Martin von Löwis' public key, which has a key id of 7D9DC8D2. The Macinstallers were signed with Ned Deily's key, which has a key id of 6F5E1540.The public keys are located on the download page.
Osx Update Python3
MD5 checksums and sizes of the released files:
[1] | (1, 2) The binaries for AMD64 will also work on processors that implement the Intel 64 architecture (formerly EM64T), i.e. the architecture that Microsoft calls x64, and AMD called x86-64 before calling it AMD64. They will not work on Intel Itanium Processors (formerly IA-64). |
[2] | (1, 2) There is important information about IDLE, Tkinter, and Tcl/Tk on Mac OSX here. Also, on Mac OS X 10.6, if you need tobuild C extension modules with the 32-bit-only Python installed, you willneed Apple Xcode 3, not 4. The 64-bit/32-bit Python can use eitherXcode 3 or Xcode 4. |
Version | Operating System | Description | MD5 Sum | File Size | GPG |
---|---|---|---|---|---|
bzip2 compressed source tarball | Source release | c57477edd6d18bd9eeca2f21add73919 | 11793433 | SIG | |
Gzipped source tarball | Source release | ba854a72c9c0ca671b99a36e070d78e0 | 63682560 | SIG | |
XZ compressed source tarball | Source release | 62c4c1699170078c469f79ddfed21bc0 | 9976088 | SIG | |
Mac OS X 32-bit i386/PPC installer | Mac OS X | for Mac OS X 10.3 and later | 80461c3c60fae64122b51eb20341b453 | 22178854 | SIG |
Mac OS X 64-bit/32-bit installer | Mac OS X | for Mac OS X 10.6 and later | 15c434a11abe7ea5575ef451cfd60f67 | 18761950 | SIG |
Windows debug information files | Windows | 008a63d89d67d41801a55ea341a34676 | 16221250 | SIG | |
Windows help file | Windows | 9401a5f847b0c1078a4c68dccf6cd38a | 5898853 | SIG | |
Windows x86-64 MSI installer | Windows | for AMD64/EM64T/x64 | d11d4aeb7e5425bf28f28ab1c7452886 | 16420864 | SIG |
Windows x86 MSI installer | Windows | c846d7a5ed186707d3675564a9838cc2 | 15867904 | SIG |