Environment Setup
For now, you will need the following software on your computer:
- A text editor
- Python
- PyCharm
- A Unix-style command line environment including Git and SQLite
We will use some of these tools in the next class, so be sure to bring your laptop.
You will also need a GitHub account if you do not already have one.
GitHub Account
If you do not already have a GitHub account, head over to github.com and create one.
GitHub is a nice arena to showcase projects that you have worked on to potential employers when you start interviewing for jobs. As such, it is wise to choose a GitHub username that you will be comfortable showing a potential employer.
Installing a Text Editor
Any text editor that supports syntax highlighting will do. Here are some popular editors for macOS:
Here are some popular editors for Windows:
Installing Python
If you do not already have Python 3 installed on your computer, go to https://www.python.org/downloads/ and download and install the latest version of Python 3.
Installing PyCharm
Go to the PyCharm download page, download the free community edition of PyCharm, and install.
Installing Git
Here the process is a bit different between macOS and Windows.
macOS
On OS X, Git comes with the Xcode command line tools package. This package must be installed separately from Xcode itself. To see if you already have it installed, open up the Terminal application. When you open up Teminal, you will be presented with a command prompt which looks something like this:
Computer-Name:~ Username$
You can run commands at this prompt. Try running Git by typing the world git
(all lowercase) and then pressing enter. If Git is already installed you will see a usage message. If not, a window will pop up asking if you want to install the Xcode command line tools. Install them now if this happens. You may get the following message:
Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo.
If so, run this command:
sudo xcodebuild -license
You will be prompted for a password, enter the password for your computer. You can scroll through the license by pressing the space bar, and press q to stop reading the license. You will then need to type agree
and press enter. Once you have completed this, try running git
again.
Windows
If you are running Windows 10, it would be best to install the Windows Subsystem for Linux (WSL). If you are running an older version of Windows, or for some reason WSL does not work on your computer, follow the Cygwin instructions. You need to set up the Windows Subsystem for Linux or Cygwin, but not both. Note that both of these methods may take some time for your computer to install.
Windows Subsystem for Linux
Follow the instructions here: https://docs.microsoft.com/en-us/windows/wsl/install-win10. The first instruction asks you to open the PowerShell as Administrator. To do this, go to the taskbar search and type in powershell. The top result should be “Windows PowerShell”. Right click on this item and select “Run as administrator”.
Any of the available Linux distributions should work for this class, but these instructions assume you select Ubuntu. Selecting either of the other distributions will make the other commands in this guide different, so I recommend using Ubuntu.
After it is installed, you can enter the Linux environment at any time by opening a command prompt and running the command bash
. To open a command prompt, go to the taskbar search and enter cmd.
Now you need to install Git in the Linux environment. One of the nice things about Linux is that you can install and upgrade programs in one place (on the command line). Make sure all the installed programs are up to date by running the following two commands. The sudo
in front of these commands means they will be run as the administrative user. You may be prompted for your Linux account password when you run a command using sudo
.
sudo apt update
and then
sudo apt upgrade
Once everything is updated, run the following command to install Git.
sudo apt install git
If there were no errors, type the command git
and press enter. If you see a usage message rather than an error, Git was installed correctly.
Cygwin
If you have a 64-bit computer (you probably do) be sure to download setup-x86_64.exe
.
Run the setup-x86_64.exe
program that you downloaded. Step through the installation process. The defaults should be fine until you get to the mirror selection screen. I had good luck picking http://mirrors.xmission.com
. Once the Cygwin core has been downloaded you will be presented with the Select Packages screen which looks like this:
You want to install the git
and sqlite3
packages. Search for these, and click on Skip
to mark the package for installation. You will get multiple results when you search for these names. You want the package simply named git
and the package simply named sqlite3
.
Once the packages have been marked for installation, click Next, and then Next again, keeping “Select required packages (RECOMMENDED)” checked.
Once all the packages have been installed, have Cygwin create a desktop shortcut and/or an entry in the start menu.
Now run Cygwin and you should be presented with a command prompt that looks something like this:
User@ComputerName-d3a3c25ad0 ~
$
Type the word git
and press enter. If you see a usage message rather than an error, Git was installed correctly.