Tuesday, February 1, 2022

[SOLVED] Move Virtual Environment in Windows

Issue

I am teaching myself Python 3.6 on Windows machine.

So far I can install virtualenv and virtualenvwrapper via pip install virtualenv pip install virtualenvwrapper pip install virtualenvwrapper-win

Unable to move virtual environment to subdirectory in C:; it's in my user directory instead

Tried following, no luck

set VIRTENV=C:\Cookbook

doesn't give errors but any virtual environment I create goes to user directory instead


Solution

See the documentation for virtualenvwrapper-win, by default it set the location to %USERPROFILE%\Envs which is the user folder. That is the user folder. To change this add an environment variable WORKON_HOME to specify the path to store the environments. See the documentation - documentation



Answered By - aspo
Answer Checked By - Gilberto Lyons (WPSolving Admin)