Share

Create a virtual environment (windows)

A virtual environment is a tool that helps to keep dependencies required by different projects separate. In this setup, we will be creating a virtual environment from which to run the Flow Production Tracking Event Daemon Trigger (shotgunEvents).

To create a virtual environment, start by running a PowerShell as an administrator. Navigate to the directory in which you downloaded the repos.

cd C:\Users\Default\shotgridDemo

Install a virtual environment.

pip install virtualenv

Create a virtual environment directory.

mkdir VirtualEnvs

Navigate to the virtual environment directory.

cd VirtualEnvs

From within the “VirtualEnvs” directory, create a “sg_events” directory.

mkdir sg_events

Make sg_events directory

Setup a virtual environment.

python -m venv .\sg_events

Once run, the python command will create several new directories within the sg_events folder. You should have something like the image below.

New folders have been created

Next, navigate to the Scripts directory.

cd .\sg_events\Scripts

Activate the virtual environment.

.\activate

The virtual environment should now be active, indicated by parentheses.

Activate the virtual environment


Was this information helpful?