简体   繁体   中英

how do you specify which python executable to use in Django 1.1.1?

I have a RH system running RHEL 5.3, which comes with python2.4 that can't be removed for numerous reasons.

I have been able to build 64-bit RPMS for python 2.6 as an altinstall. It's called with "python26".

How can I tell Django to use this command to get to the proper python version, instead of the default "python".

I can, of course, change the symlink in /usr/bin manually, but i'm looking to fully automate the buildout of these systems, and I'm almost certain this is possible.

Thanks.

看一下virtualenv ,您可以使用不同的lib版本,符号链接等为django设置自己的环境(好吧,什么都可以)。

That depends on the deploying method you use. Eg, if you use the django-recommended mod_wsgi deployment, then you must compile it with the correct python version .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM