Balkyto
Balkyto

Reputation: 1510

Activating/deactivating a virtualenv

I started working on my first python API hello world example on Friday on my VPS that is running Ubuntu 14.04. I used python3, created folder, virtualenv, activated it and then electricity went out and my connection broke.

I've left it there, and tried to continue where I stopped. Now, I can't find a way to "get into active" mode (to get that command-line view saying something like

(myprojectenv)user@host:~/myproject$

I've searched for "deactivate" somewhere in order to re-activate it again, but can't find anything such.

Any help understanding what is proper way of handling Virtualenv's is appreciated.

Upvotes: 1

Views: 1676

Answers (2)

ilse2005
ilse2005

Reputation: 11429

You have to activate you virtualenv again. In bash you have to source the activate file:

source myprojectenv/bin/activate

Upvotes: 4

Balkyto
Balkyto

Reputation: 1510

OK, if someone ends up in similar situation as I did.

Just "activate" your virtualenv again:

$source yourenv/bin/activate

That will re-activate it, and then you can "deactivate".

Upvotes: 2

Related Questions