- Install Brew (if not already installed)
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
- Install pip (if not already installed)
$ [sudo] easy_install pip
$ pip --version
- Install virtualenv (if not already installed)
$ [sudo] pip install virtualenv
$ virtualenv --version
- Set up your virtual environment
$ virtualenv env
$ source env/bin/activate
- Install Flask (and the other dependencies)
pip install -r requirements.txt
- Run the Flask server!
$ python app.py
-
You should already have python3 and pip installed from the first CS61A lab. To confirm that you have pip run
pip -Vand make sure it outputs something like pip9.0.1 from...(it's okay if the version number is a little different). -
Open git bash and navigate to this directory
-
Create a virtual environment
$ python -m venv env
If you normally use py or python3 instead of python to run python files use that instead.
- Activate the virtual environment
$ source env/Scripts/activate
You will have to do this every time you open a new terminal.
- Install Flask (and the other dependencies)
$ pip install -r requirements.txt
- Run the Flask server!
$ python app.py