-2
On Linux I can run
. bin/activate
I tried the same command on Windows, but it didn’t work. How do I activate virtualenv on Windows?
-2
On Linux I can run
. bin/activate
I tried the same command on Windows, but it didn’t work. How do I activate virtualenv on Windows?
3
When you create Virtualenv from Windows, the created folder structure will be:
D:\projeto\venv
│ pyvenv.cfg
│
├───Include
│ ...
├───Lib
| ...
└───Scripts
activate
activate.bat
Activate.ps1
deactivate.bat
easy_install-3.9.exe
easy_install.exe
pip.exe
pip3.9.exe
pip3.exe
python.exe
pythonw.exe
That is, the path you tried to run, bin/activate
, will not exist. Even if it existed it would not work, as this file has instructions for configuring Linux environments.
On Windows, you can use the file activate.bat
or the activate.ps1
if you are using Powershell.
Example:
D:\projeto> .\venv\Scripts\activate.ps1
(venv) D:\projeto>
Browser other questions tagged python windows virtualenv
You are not signed in. Login or sign up in order to post.
Hello, Ana. Important [Edit] your question and provide a [mcve]. See also the Quick guide on how to ask questions
– Wallace Maxters