virtualenvwrapper-win error: "No project directory found for current virtualenv"
Asked Answered
H

0

0

What was done:

  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 (I didn't want to use GitHub)
  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:

The system cannot find the path specified.

"C:\Users\Kat\Documents\Programming\repo\TDD" is now the project directory for
virtualenv "C:\Users\OtherUsername\Envs\TDD" The system cannot find the path specified.

"C:\Users\Kat\Documents\Programming\repo\TDD" added to
C:\Users\OtherUsername\Envs\TDD\Lib\site-packages\virtualenv_path_extensions.pth

((TDD) ) C:\Users\Kat\Documents\Programming\repo\TDD>

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.)

Hecklau answered 29/12, 2021 at 1:57 Comment(4)
After some time away, I came back and realized the original computer this came from had a different username than mine (duh) ... So I checked the following: (1) Confirmed my 2nd Envs folder had the TDD folder (it did but the script was looking for the wrong drive location - so nothing took) and then (2) found that the virtualenv_path_extensions.pth file (same location as original machine but on local) had the old project folder in it ..... will test and update soonHecklau
well that did nothingHecklau
back for another round found here that there was a file in my C:\Users\USERFOLDER\Envs\PROJECT\Scripts folder that the 1activate.bat` file was in there. I see reference to the old machine name so gonna fix those locations and see if that fixes it.Hecklau
it worked!!! Well, with 1 small addition. But I'll post the answer soon.Hecklau

© 2022 - 2024 — McMap. All rights reserved.