Question

For sometime now I have been syncing my projects folder between my laptop and desktop using an app called syncfolderspro. Inside my projects folder I also have some python virtual environment folders.

As I understand it such folders cannot be synced as many file path are hardcoded. But is this only that case with the activate script or something to do with python importing libraries (I suspect the latter, as even a direct path to the virtual env python doesn't work).

Is there a particular reason why relative paths can't be used? What are some good workarounds when working on multiple machines?

Was it helpful?

Solution

After almost a month I finally found a workaround. syncfolderpro has a option to exclude a folder from the sync, and I set it to exclude the virtenv folders. Then I sync requirement.txt between the machines and install the virtual environment on each on separately. That way the project files sync, but the virtual environment ones don't becomes messed up

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top