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