如何在设置中指定要使用的应用程序版本?已安装的应用程序
我已经在系统上安装了一个模块版本(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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Virtualenv (和 virtualenvwrapper) 绝对是您在能够创建新环境时处理此类事情的朋友。你应该继续玩它。如果你现在无法使用 virtualenv,你可以将你的个人 python lib 路径放在 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:
有一个名为
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.