Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python Setting Up a Local Python Environment Installing Python and Python Libraries Locally Using virtualenv

Why does the virtualenv command fail on Windows 10 or why could it fail?

I was trying to setup my virtualenv on a Windows 10 machine. Unfortunately, I get an error when I try to do that and it doesn't complete the process of creating a full virtual environment. I know that because I do not see an activate command or even a bin directory. Perhaps on Windows the directories are named differently but after getting the failure message, I looked in the virtualenv folder that I tried to create and it did not have the activate command anywhere in there.

Thanks, Bruce

2 Answers

Hi Bruce

In windows, navigate to your virtualenv folder and you should see a folder called Scripts where you can find activate. So to activate your virualenv on windows Scripts\activate.

hope this helps.

Paul Hughes
Paul Hughes
8,250 Points

Hi Bruce,

It took me quite a while to find it but the activate file on my Windows 10 computer was located in the following PATH:

C:\Python34\Lib\venv\scripts\nt\activate

The file is named: activate.bat

If you have trouble finding it on your computer try the following:

  • Open Windows File Explorer
  • Navigate to the Python34 folder
  • Use the search box in the upper right to search for: activate.bat
  • That should give you the path to the activate file

I hope this helps.