2. To work with flask, we’ll first set up a virtual environment to work in. A virtual environment is a
place on your system where you can install packages and isolate them from all other Python
packages. Separating one project’s libraries from other projects is beneficial and will be
necessary when we deploy Learning Log to a server.
Creating a Virtual Environment
3. To work with flask, we’ll first set up a virtual environment to work in. A virtual environment is a
place on your system where you can install packages and isolate them from all other Python
packages. Separating one project’s libraries from other projects is beneficial and will be
necessary when we deploy Learning Log to a server.
Creating a Virtual Environment
4. Create a new directory for your project called learning_log, switch to that directory in a
terminal, and create a virtual environment. If you’re using Python 3, you should be able to
create a virtual environment with the following command:
Creating a Virtual Environment
5. If you’re using an earlier version of Python or if your system isn’t set up to use the venv
module correctly, you can install the virtualenv package. To install virtualenv, enter the
following:
Installing virtualenv
6. Activate your virtual environment:virtualdjangoScriptsactivate
Activating the Virtual
Environment