Skip to Content
Introducing Python, 2nd Edition
book

Introducing Python, 2nd Edition

by Bill Lubanovic
November 2019
Beginner
630 pages
12h 20m
English
O'Reilly Media, Inc.
Audiobook available
Content preview from Introducing Python, 2nd Edition

Appendix B. Install Python 3

Most of the examples in this book were written and tested with Python 3.7, the most recent stable version at the time of writing. The What’s New in Python page presents what was added in each version. There are many sources of Python and many ways to install a new version. In this appendix, I describe a few of these ways:

  • A standard installation downloads Python from python.org, and adds the helper programs pip and virtualenv.

  • If your work is heavily scientific, you may prefer to get Python bundled with many scientific packages from Anaconda and use its package installer conda instead of pip.

Windows doesn’t have Python at all, and macOS, Linux, and Unix tend to have old versions. Until they catch up, you may need to install Python 3 yourself.

Check Your Python Version

In a terminal or terminal window, type python -V:

$ python -V
Python 3.7.2

Depending on your operating system, if you don’t have Python or the operating system can’t find it, you’ll get some error message like command not found.

If you do have Python and it’s version 2, you may want to install Python 3—either system wide, or just for yourself in a virtualenv (see “Use virtualenv”, or “Install virtualenv”). In this appendix, I show how to install Python 3 system wide.

Install Standard Python

Go to the official Python download page with your web browser. It tries to guess your operating system and present the appropriate choices, but if it guesses wrong, you can use these:

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Introducing Python, 3rd Edition

Introducing Python, 3rd Edition

Bill Lubanovic

Publisher Resources

ISBN: 9781492051374Errata Page