I can activate my virtualenv only as root user:
source myprojectenv/bin/activate
-sh: 80: source: not found
sudo su
root@ubuntu-serv:/home/user/project# source myprojectenv/bin/activate
(myprojectenv) root@ubuntu-serv:/home/user/project#
How can I fix it? I need it for Fabric deployment as non root user:
def production():
env.host_string = 'xxx.xxx.xxx.xx'
env.user = 'username'
path = "/home/username/project/project"
cd("home/username/project")
run("sudo source projectenv/bin/activate")
Use the following syntax to activate the virtualenv
. myprojectenv/bin/activate
the sh
shell does not have the source
command.
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