I'm trying to use virtualenv on my development machine. I successfully created my new environment issuing virtualenv venv in /home/user/. When I try to activate it (from user location) with sudo venv/bin/activate I get venv/bin/activate: command not found.
You don't run activate as a script; you need to source it in your shell, since it affects the shell itself.
It probably also doesn't make any sense to run it under sudo.
Check that the virtualenv is actually where you think:
stat /home/user/venv/bin/activate
If it is, then you need to source the file in:
source /home/user/venv/bin/activate
If the file doesn't exist, you've created the venv in a different location.
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