I want to run the Windows (Command Prompt) equivalent of
source myvenv/bin/activate so as to activate and enter into my virtual environment.
35 Answers
For activating an environment:
activate myenv for deactivating (all)
deactivate 2At CMD prompt,it worked by running
myvenv\scripts\activate.bat 2Go 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\activate This 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/activate Image for demonstration and example:
just use:
myvenv/bin/activate Image for demonstration and example:

