共享 Python virtualenv 环境 [英] Sharing Python virtualenv environments
问题描述
我在一个用户帐户中有一个 Python virtualenv(使用 virtualenvwerapper 创建).我想从同一主机上的另一个用户帐户使用它.
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.
我该怎么做?如何设置虚拟环境以便主机上的任何用户都可以使用?(主要是 Linux/Debian,但也有 Mac OSX.)
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.)
谢谢.
推荐答案
把它放在一个用户中立的目录中,并使其组可读.
Put it in a user-neutral directory, and make it group-readable.
例如,对于库,我使用 /srv/http/share/
跨网络应用程序共享代码.
For instance, for libraries, I use /srv/http/share/
for sharing code across web applications.
您可以将 /usr/local/share/
用于普通应用程序.
You could use /usr/local/share/
for normal applications.
这篇关于共享 Python virtualenv 环境的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!