Before you can start coding with Python, you have to ensure that your computer is set up right. I'll take you through the process of installing Python on your MacOS, Windows or Linux OS via the Anaconda distribution. After that, you'll need to install a code editor. I use Sublime Text and would suggest it for this course. But you can use any text editor you prefer.
1. Install Sublime Text
Before we write our first line of Python code, you'll need to install a text editor (sometimes called an IDE). In this course, we'll be using Sublime Text.
- Go to SublimeText.com and download the installer for Sublime Text (Mac or PC, Free software)
- Install Sublime Text (the latest version) and make sure it's easily accessible on your computer.
If a window pops up saying something like "unregistered evaluation version," then click "cancel" and you can remain using the free trial mode indefinitely.
2. Install Python
There are several ways to install Python on your computer. We'll be using a simple installer called Anaconda.
- Download the Python 3.6+ version Anaconda installer for Windows, OSX, or Linux.
- Accept all the defaults during installation (just click "Continue" or "Next" the whole way).
- If you run into the following error (see below) click "Install for me only" again and you should be able to continue.
4. Once the installation has finished, restart your computer.
3. Set Up You're Command Line
The command line is where you run your code once you've written it, and its already installed by default on most computers.
- Follow these instructions to get Terminal (the OSX version) or PowerShell (the Windows version) set up.
- The "Do More" section is optional. We'll be going over that in class.
- Complete exercises 2, 3, 4, 5, and 6 to get familiar with the command line. We'll be using it throughout the course. (This step is also optional but HIGHLY recommended.)
Common Issues Installing Python
- Make sure you restart your computer after running the Python installer.
- Make sure you only type python in the prompt (no quotes, no spaces, no punctuation, nothing).
- You may have to disable antivirus temporarily.
- If you're on a work computer and it doesn't let you install Python or Sublime Text than you may need to contact you're IT team and request permission.