CrabSpy
CrabSpy

Reputation: 73

virtualenv/virtualenvwrapper confusion - how to properly use

Sorry if this is dumb but every piece of documentation i read doesn't ever seem to answer this question in a direct way. How do i properly use virtualenv so that I have a virtualenv i can call with workon?

When i do tutorials like "Effective Django" they use the virtualenv command on an empty folder, then activate it. That works, until tomorrow when I want to work on the app again at which point the virtualenv is gone. What do i do at this point, I've used mkvirtualenv before and that creates a "permanent" virtualenv i can call with "workon" but I don't understand how i would use mkvirtualenv on an existing project or if this is a good idea or not, as it stands i have a project I virtualenv yesterday that has a bin folder in it and I am not sure if I need to source it again or what. Ideally i want to just workon project and get to work.

Upvotes: 0

Views: 340

Answers (1)

Marcin
Marcin

Reputation: 49826

When i do tutorials like "Effective Django" they use the virtualenv command on an empty folder, then activate it. That works, until tomorrow when I want to work on the app again at which point the virtualenv is gone.

I strongly doubt that this is the case, unless something is deleting your directories overnight. If that is the case, stop putting your code where it is being deleted.

Assuming that is not the case, the solution is for you to go back to the directory you created as a virtualenv, and reactivate it.

Upvotes: 2

Related Questions