Setup Instructions
Setup
Working Remotely on Google Cloud
Working locally
Installing Anaconda: We recommend using the free Anaconda Python distribution, which provides an easy way for you to handle package dependencies. Please be sure to download the Python 3 version, which currently installs Python 3.6. We are no longer supporting Python 2.
Anaconda Virtual environment: Once you have Anaconda installed, it makes sense to create a virtual environment for the course. If you choose not to use a virtual environment, it is up to you to make sure that all dependencies for the code are installed globally on your machine. To set up a virtual environment, run (in a terminal)
conda create -n cs682 python=3.6 anaconda
to create an environment called cs682
.
Then, to activate and enter the environment, run
source activate cs682
To exit, you can simply close the window, or run
source deactivate cs682
Note that every time you want to work on the assignment, you should run source activate cs682
(change to the name of your virtual env).
You may refer to this page for more detailed instructions on managing virtual environments with Anaconda.
Python virtualenv: Alternatively, you may use python virtualenv for the project. To set up a virtual environment, run the following:
cd assignment1
sudo pip install virtualenv # This may already be installed
virtualenv -p python3 .env # Create a virtual environment (python3)
# Note: you can also use "virtualenv .env" to use your default python (please note we support 3.6)
source .env/bin/activate # Activate the virtual environment
pip install -r requirements.txt # Install dependencies
# Work on the assignment for a while ...
deactivate # Exit the virtual environment