I have a Python virtualenv (created with virtualenvwerapper) in one user account. I would like to use it from another user account on the same host.
How can I do this? How can I set up virtual environments so as to be available to any user on the host? (Primarily Linux / Debian but also Mac OSX.)
Thanks.
Don't share virtual environments between projects If you have multiple projects that have roughly the same requirements, it might seem like a good idea to create a single virtual environment that both projects can share. Don't do it.
Virtual environments are meant to keep things isolated from each other. If one project is a dependency of the other one, then they have to be installed in the same environment. If two projects have dependencies that conflict with each other, then they have to be installed in different environments.
A virtual environment helps keep your project bundled together with a list of its dependencies. This makes it portable and easy for someone else to open your project and get it up and running without dozens of import errors.
Put it in a user-neutral directory, and make it group-readable.
For instance, for libraries, I use /srv/http/share/
for sharing code across web applications.
You could use /usr/local/share/
for normal applications.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With