Photo by Chris Ried on Unsplash

Activating Virtualenv on Windows using Git Bash — Python 3.7.1

If you’ve struggled with activating Python virtualenv on Windows this short post is for you.

--

On Windows I have python 3.7 installed and I still couldn’t activate virtualenv from Git Bash with ./Scripts/activate although it worked from Powershell after running Set-ExecutionPolicy Unrestricted in Powershell and changing the setting to "Yes To All".

I don’t like Powershell and I like to use Git Bash, so to activate virtualenv in Git Bash first navigate to your project folder, use ls to list the contents of the folder and be sure you see "Scripts". Change directory to "Scripts" using, once you're in the "Scripts" path, use . activate to activate virtualenv. Don't forget the space after the dot.

Be sure to cd out of the Scripts directory and return back to your project folder.

--

--

Presh Onyee
Presh Onyee

Written by Presh Onyee

User Experience Designer sharing random thoughts on creativity and product design.