点Django在不同的Python版本 [英] Point Django at different Python version

查看:74
本文介绍了点Django在不同的Python版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Django应用程序需要更高版本的Python。我刚安装到 2.5 (从 2.4 ),现在当我做一个 python 在命令行,它说 2.5.2 。说到这里,Django仍然说: Python Version:2.4.3



我该如何更正?我已经重新启动/重新启动/重新部署了无效。

解决方案

你倒退了。



Django被添加到Python的环境中。



当您安装新的Python时,您必须重新安装所有内容,包括Django - 为新的Python



在新的Python中添加新的Django后,您的 PATH 设置决定了您使用的是哪个Python 。



Python版本(和 PYTHONPATH )决定您将使用哪个Django。


Django application requires a later version of Python. I just installed it to 2.5 (from 2.4) and now when I do a python at the command line, it says 2.5.2.

Having said that, Django still says Python Version: 2.4.3.

How do I correct this? I've rebooted / restarted / redeployed to no avail.

解决方案

You have it backwards.

Django is added to Python's environment.

When you install a new Python, you must reinstall everything -- including Django -- for the new Python.

Once you have the new Django in the new Python, your PATH settings determine which Python you're using.

The version of Python (and the PYTHONPATH) determine which Django you'll use.

这篇关于点Django在不同的Python版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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