How come I can not activate my Virtual Python Environment with 'source env/bin/activate' command?

Viewed 68685

I am trying to activate my Virtual Python Environment to use with Pylons but I think I am executing the commands wrong.

jem@jem-laptop:~$ source env/bin/activate
bash: env/bin/activate: No such file or directory

What am I doing wrong? How should I do it right?

8 Answers

On FreeBSD I solved this doing following:

# ls mypienv
# mypienv/bin/activate
mypienv/bin/activate: Permission denied.
# chmod +x mypienv/bin/activate
# mypienv/bin/activate
Missing '}'.

And you see that script not working but:

# ls mypienv/bin/
activate        activate.fish       easy_install-2.7    pip2.7          python2
activate_this.py    activate.ps1        pip         python          python2.7
activate.csh        easy_install        pip2            python-config       wheel

Finaly:

# python mypienv/bin/activate_this.py

And it worked! P.S. I am new with python python verions 2.7

Simple fix:

$ virtualenv env
$ cd env/Scripts/
$ . activate

env/Scripts/activate worked for me.

For Windows, the following worked for me:

C:\.virtualenvs\env\Scripts>activate.bat

Related