Python Tool Set Installation Instructions

These instructions are specifically designed for the virtual machine image created and maintained by JMU's Unix User's Group (UUG).

Get and Install the Virtual Machine Image

Install ToolSets - Option One: pip User Install

There are a number of ways to handle installing Python packages, each with advantages and disadvantages. One option is to use pip to install packages for a single user in your home directory. This is probably preferable to installing packages system-wide because it less likely to interfere with your overall system configuration. The steps below will be executed in a terminal window. To start a terminal window, click on the black screen icon, located in the bottom left corner.

sudo apt-get update
sudo apt-get install python3-distutils python3-pip python3-dev python3-venv
python3 -m pip install --upgrade pip
echo 'export PATH="$HOME/.local/bin/:$PATH"' >> ~/.bashrc
source ~/.bashrc
pip3 install --user wheel setuptools
pip3 install --user numpy matplotlib notebook pandas scikit-learn tensorflow spyder

Install ToolSets - Option Two: Virtualenv

Another option is to use Python virtual environments. The advantage of this approach is that it allows a single user to switch between multiple Python configurations. You can use the following steps to set up a virtual environment with the tools for this course:

sudo apt-get update
sudo apt-get install python3-distutils python3-pip python3-dev python3-venv
python3 -m venv ~/venv
source ~/venv/bin/activate
pip install --upgrade pip
pip install numpy matplotlib notebook pandas scikit-learn tensorflow spyder

This virtual environment can be activated and deactivated on a per-terminal basis: source ~/venv/bin/activate activates the environment and deactivate deactivates it.

Running on CS Lab Machines

The full tool set for this course takes up around 1.5G of space on disk, so please don't follow the steps above to configure your account on the CS lab machines. Instead you can use a pre-configured virtual environment as follows:

source /cs/shr/cs480_ml/ml_venv/bin/activate

Python Editors

Spyder

The instructions above installed the open-source Spyder scientific Python IDE. It's OK. It can be run from a terminal by typing spyder3.

PyCharm

PyCharm is a bit more polished than Spyder and has a few nice features that Spyder does not. (For example, automatic code formatting.)

The "Community Edition" is probably fine for our purposes. As a student, you can also get a free one-year license for the "Professional Edition":