Get Started

Try to do the following before the first day of class.

1. Install Python

$ conda update conda
$ conda install requests beautifulsoup4 sqlite pyqt ipython numpy pandas matplotlib jupyter
$ conda install statsmodels scipy scikit-learn

For this class you don’t technically need the third line above, but these are common packages used in data analytics, which is a major application area for Python. We may discuss some of these as special topics during the last week of the course.

2. Check Your Python Installation

  1. Open a terminal, i.e., operating system (OS) command shell.

    • The Mac OS X terminal is /Applications/Utilities/ in the Finder. You should drag Terminal to your dock – you’ll use it often.

    • On Windows search for and run cmd.exe, for example by simply typing cmd in the start search box.

  2. At the command prompt type python3 --version. You should get a response like Python 3.5.2 :: Continuum Analytics, Inc..

    • Note: on Windows the Python 3 command is just python (without the 3). Anaconda/Miniconda also aliases python to python3.

3. Choose, install and configure a text editor using our text editors guide.

In this class we will use the terminal, the Python REPLs (python and ipython), and text editors. We will not use an integrated development environment (IDE) such as IDLE or PyCharm. Learning how to use the command line and text editors is crucial to becoming a competent programmer and data manipulator.

Learn About Programming and Computing

Learn About Python

Enrolled in Modern Physics 2?

If you’re enrolled in Modern Physics 2 and need to run VPython for Physics, then you’ll need to manage a Python 2 installation for Physics and Python3 for CS 2316. You can manage two Python version using conda environments. To set it up, do this at the command line:

conda create -n py27 python=2.7
conda install psutil
source activate py27
conda install -c mwcraig vpython=6.11.0

The first two lines create a conda environment for Python 2.7, the third line activates it, and the fourth line installs vpython into your Python 2.7 environment (named py27).

With this setup, any time you want to run vpython you have to do

source activate p27

And when you’re done you can go back to the root 3.5 environment for CS 2316 with

source deactivate

Non-Conda Solution

Some students have reported success installing the Physics VPython software after installing Python 2 from With this setup you would use python for Physics stuff and python3 for CS 2316 stuff. At the command line you should get something like this:

$ python --version
Python 2.7.3
$ python3 --version
Python 3.5.2 :: Continuum Analytics, Inc.