如何在设置中指定要使用的应用程序版本?已安装的应用程序

发布于 2024-08-30 10:51:13 字数 132 浏览 1 评论 0原文

我已经在系统上安装了一个模块版本(South 0.6),并在我的家里安装了较新的版本。当我将“south”添加到 INSTALLED_APPS 时,它使用系统版本。我如何告诉 Django 使用我家的版本?

谢谢

七月

I've got a version of a module (South 0.6) installed system-wise and a newer version installed in my home. When I add 'south' to my INSTALLED_APPS, it uses the system-wise version. How can I tell Django to use the version in my home?

Thanks

Jul

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

甜点 2024-09-06 10:51:13

Virtualenv (和 virtualenvwrapper) 绝对是您在能够创建新环境时处理此类事情的朋友。你应该继续玩它。如果你现在无法使用 virtualenv,你可以将你的个人 python lib 路径放在 PYTHONPATH 的前面:

# from your command prompt:
$ export PYTHONPATH=$HOME/your/python/libs:$PYTHONPATH

Virtualenv (and virtualenvwraper) is definitely your friend for handling things like this when you are able to create a new environment. You should go ahead and play with it. If you are not able to mess around with virtualenv right now, you can just put your personal python lib path at the front of PYTHONPATH:

# from your command prompt:
$ export PYTHONPATH=$HOME/your/python/libs:$PYTHONPATH
贪恋 2024-09-06 10:51:13

有一个名为 virtualenv 的包,旨在处理这个特定的问题问题。它允许您为每个 python 项目(即 Django 项目)创建一个虚拟环境,让您选择安装哪个版本的模块。

There is a package named virtualenv which was designed to handle this specific problem. It allows you to create a virtual environment for each python project (ie. Django project), letting you choose which version of a module is installed.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文