1) I installed virtualenv using pip.
2) I ran the command virtualenv venv
3) Then I ran source venv/bin/activate
but it says that there is no such file or directory.
When I cd
into venv/bin
I find 3 things - python, python 2.7, and python 3.5. Does anyone know the problem?
Check the $VIRTUAL_ENV environment variable. The $VIRTUAL_ENV environment variable contains the virtual environment's directory when in an active virtual environment. Once you run deactivate / leave the virtual environment, the $VIRTUAL_ENV variable will be cleared/empty.
Don't forget to activate your Python virtual environmentBefore a virtual environment can be used in a particular shell session, it has to be activated, by way of a script named activate in the virtual environment's Scripts directory.
i have had the same problem. and what i did is just run the command virtualenv env
again. And then more files were generated under directory env/bin, including the activate file. it's so weird.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With