These instructions are specifically designed for the virtual machine image created and maintained by JMU's Unix User's Group (UUG).
Download and install the VirtualBox software for your platform https://www.virtualbox.org
Download the virtual machine image from the JMU’s Unix User Group (UUG) site: https://w3.cs.jmu.edu/uug/. The file you want is image-fa19a.ova and is rather large (1.5 GB).
Start VirtualBox
Select File, then "Import Appliance...", select the file you download (image-fa19a.ova) and create then machine.
Start the machine by double clicking on the name (JMU Linux Mint Fa19) on the left side of your VirtualBox window You will then need to proceed through the Linux OS configuration screens.
Select English and then continue.
Take the default keyboard (English (US) and press Continue.
Take New York as the default timezone, and press Continue.
Select Your name (Use your e-id for this. So, for example, I used spragunr). This will auto populate the next 3 fields.
Select a password and then press Continue The system will then execute a few configuration scripts (this took about 2 minutes on my laptop). At the conclusion of this process, you will able to login to the machine using your username and password.
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
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.
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
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 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":
Register for a free version of PyCharm professional. Visit https://www.jetbrains.com/student/. (It took less than 5 minutes for my license to get approved.)
After being approved, create your JetBrains account. You will need this to register your copy of PyCharm.
Download the PROFESSIONAL version of PyCharm from https://www.jetbrains.com/pycharm/download. At the welcome screen, select activate new license with: JetBrains account