共享 Python virtualenv 环境 [英] Sharing Python virtualenv environments

查看:32
本文介绍了共享 Python virtualenv 环境的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在一个用户帐户中有一个 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆