Virtual environments are important in Python development because it makes sure the same program will function the same way on different computers.
cd
to the project directory.- Install
virtualenv
by typingpip install virtualenv
in the Terminal - Type
virtualenv -p python3 venv
to create your virtual environment. - Activate the
virtualenv
by typingsource venv/bin/activate
. You should see a(venv)
at the beginning of command lines now. - Type
pip install -r requirements.txt
to install the libraries used by the program. - Now, run
server.py
to start the server by typingpython server.py