I want to run the Windows (Command Prompt) equivalent of
source myvenv/bin/activateso as to activate and enter into my virtual environment.
35 Answers
For activating an environment:
activate myenvfor deactivating (all)
deactivate 2 At CMD prompt,it worked by running
myvenv\scripts\activate.bat 2 Go to the the directory where you have the ".bat" file by executing this command:
C:\Users\MyName\Desktop\ProjectsWork\FlaskApplication> cd env\Scripts
Then just call the ".bat" file
\Desktop\ProjectsWork\FlaskApplication\env\Scripts> activate.bat
(env) C:\Users\MyName\Desktop\ProjectsWork\FlaskApplication\env\Scripts>
If you want to activate your virtual environment after running:
virtualenv env Just run:
env\Scripts\activateThis command will provide you the correct path and the command "source" is not necessary.
In windows you don't need any command to directly activate an environment (like a virtual machine) but simply add "activate" or "deactivate" to the end of the path to the environment.
source myvenv/bin/activateImage for demonstration and example:
just use:
myvenv/bin/activateImage for demonstration and example: