virtualenvwrapper-win icon indicating copy to clipboard operation
virtualenvwrapper-win copied to clipboard

HELP WANTED (not a bug): Manually Moving Environments

Open ProsperousHeart opened this issue 4 years ago • 2 comments

I am not opposed to just starting from scratch - it's not an issue. But I was curious how one might resolve going about this issue where I was manually moving (I didn't want to use GitHub yet) my project files and environment folder to a different machine:

  1. Created a folder on Google drive
  2. copied my project files folder to the 1st folder
  3. copied the virtual environment from my Envs folder to the 1st folder
  4. put the folders from 2 & 3 in their respective locations on a new machine
  5. when trying to run workon TDD it activates the virtual environment then tells me:

No project directory found for current virtualenv

switches to the project dir of the activated virtualenv

If I run setprojectdir "C:\Users\Kat\Documents\Programming\repo\TDD" it tells me:

image

But if I deactivate, move to a new folder, and activate again it acts as if no project folder was created.

What am I missing here? Do I just need to start over with the virtual environment? (This was just to test something, anyway.)

ProsperousHeart avatar Dec 29 '21 21:12 ProsperousHeart

Moving virtualenvs has never really been well supported (if at all). I would suggest re-creating the virtualenv (should be easy, e.g. pip freeze > venv-reqs.txt in the old environment and mkvirtualenv newenv -r venv-reqs.txt in the new environment).

thebjorn avatar Dec 30 '21 12:12 thebjorn

I found the solution! Once I have written it out, will post and close this.

ProsperousHeart avatar Jan 09 '22 01:01 ProsperousHeart