Reputation: 352
I had a problem come up when I was forced to change my project directory name.
First Virtualenvwrapper didn't see my projects, so I changed the environment variable of WORKON_HOME to the new project directory. I could then activate my envs. But now when my project is doing anything, it thinks it's in the old directory, not the new one. I can't figure out how to change this. I've looked in the reference material, and looked for the place that actually points to where the projects are, but I had no luck with either. Please help.
Upvotes: 6
Views: 4919
Reputation: 96
It sounds like you want to set an already-created virtual environment to a directory that contains your project. One way that I am familiar with to do the following, based on the virtualenvwrapper documentation.
workon myvirtualenv
$ cd my/project/dir
$ setvirtualenvproject
The default is to use the current directory. The full syntax is:
$ setvirtualenvproject [virtualenv_path project_path]
I hope this helps!
Upvotes: 8