Python Forum
Why is virtualenv not by default relocatable? - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: Why is virtualenv not by default relocatable? (/thread-16633.html)



Why is virtualenv not by default relocatable? - bpostow - Mar-07-2019

I'm working in a system (not my choice) where the code lives on a dropbox, and everyone runs from the shared dropbox. I can't change that, so don't bother to suggest it.

Now, the problem is that everyone's dropbox is mounted in their home-directory (I can't change that either). So, if I put the virtualenv on the dropbox, everyone will have a different path.

My question is: Why is this hard? Why are all paths in a virtualenv not relative to the virtualenv directory? I understand that some things may need to be in /usr/local, or whatever, so everyone may still need to have python installed on their computer, but why do I need to manually search and replace all /users/brianp with $HOME? I first ran with --relocatable, but that doesn't change any 'normal script file'

Alternatively: What massive failure mode am I inviting with this architecture? and is there a better way to do this that doesn't require each user to maintain their own copy of the venv?


RE: Why is virtualenv not by default relocatable? - bpostow - Mar-08-2019

*IF* I could convince everyone to move their dropbox mountpoint to / or /Volumes or something, would that solve my problem?