Activate Virtualenv (venv) on Windows using Git Bash

Shadman Saif
1 min readOct 12, 2019

--

Example

This is first of the few ways to do this. The command is pretty straight forward and is given below. It is very important that we do not miss the space after the dot.

“. path/to/the/virtual/environment/Scripts/activate”

Another option is we simply navigate to the directory.

“path/to/the/virtual/environment/Scripts”

followed by the command below, again making sure there is a space after the dot.

“. activate”

The third option which is more commonly used is given that we are in the project directory and the virtual environment directory in the project directory we then use the following command.

“. virtual_environment_directory/Scripts/activate”

Look at the picture at the beginning of this post for an example. This is the preferred since we don’t have to leave the project directory and the command itself is not that large in length. In all cases a space after the dot is a must.

--

--