Hi; I am trying to change the default version of python on my centos 5.7 box and leave the old installation. Frustrated by not finding any help online, I went ahead and installed Python 2.6 from the source. It appears to be my default, but when I fire up mod_wsgi, it complains that it can't import os. Please advise. TIA, Quincey?
On 14.4.2012 20:40, Quincey Robertson wrote:> I am trying to change the default version of python on my centos 5.7 box and leave the old installation. Frustrated by not finding any help online, I went ahead and installed Python 2.6 from the source. It appears to be my default, but when I fire up mod_wsgi, it complains that it can't import os. Please advise.I will not answer your question, sorry. I just remembered that for ruby is such a thing called rvm (Ruby version manager) http://beginrescueend.com/ . I wonder if it could be extended for use with other languages. As I understood it is just a shell wrapper that sets PATH and such things. -- Kind Regards, Markus Falb -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 307 bytes Desc: OpenPGP digital signature URL: <http://lists.centos.org/pipermail/centos/attachments/20120414/9249500c/attachment-0003.sig>
On 14.4.2012 20:40, Quincey Robertson wrote:> Hi; > I am trying to change the default version of python on my centos 5.7 box and leave the old installation. Frustrated by not finding any help online, I went ahead and installed Python 2.6 from the source. It appears to be my default, but when I fire up mod_wsgi, it complains that it can't import os. Please advise.hard to tell without error message, but I guess that mod_wsgi is linked to your old python and wont work with another python. Maybe you have to recompile mod_wsgi too? ...snip $ ldd /usr/lib64/httpd/modules/mod_wsgi.so ... libpython2.4.so.1.0 => /usr/lib64/libpython2.4.so.1.0 ... snap... -- Kind Regards, Markus Falb -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 307 bytes Desc: OpenPGP digital signature URL: <http://lists.centos.org/pipermail/centos/attachments/20120414/02a50dc5/attachment-0003.sig>
On 04/14/2012 01:40 PM, Quincey Robertson wrote:> Hi; > I am trying to change the default version of python on my centos 5.7 box and leave the old installation. Frustrated by not finding any help online, I went ahead and installed Python 2.6 from the source. It appears to be my default, but when I fire up mod_wsgi, it complains that it can't import os. Please advise. > TIA, > Quincey >http://blog.milford.io/2010/08/new-method-for-installing-python-2-6-4-with-mysql-python-on-centos-5-5/ http://blog.milford.io/2012/01/building-and-installing-python-2-7-rpms-on-centos-5-7/ -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 262 bytes Desc: OpenPGP digital signature URL: <http://lists.centos.org/pipermail/centos/attachments/20120414/391867f2/attachment-0003.sig>
Use the modules environment to change the default for users but not the default for the system. See modules.sf.net ----- Original Message ----- | Hi; | I am trying to change the default version of python on my centos 5.7 | box and leave the old installation. Frustrated by not finding any | help online, I went ahead and installed Python 2.6 from the source. | It appears to be my default, but when I fire up mod_wsgi, it | complains that it can't import os. Please advise. | TIA, | Quincey | _______________________________________________ | CentOS mailing list | CentOS at centos.org | http://lists.centos.org/mailman/listinfo/centos | -- James A. Peltier Manager, IT Services - Research Computing Group Simon Fraser University - Burnaby Campus Phone : 778-782-6573 Fax : 778-782-3045 E-Mail : jpeltier at sfu.ca Website : http://www.sfu.ca/itservices http://blogs.sfu.ca/people/jpeltier Success is to be measured not so much by the position that one has reached in life but as by the obstacles they have overcome. - Booker T. Washington
Apparently I need to install apache2-dev. Apparently there isn't such available from yum. I can't even figure out where to download a tarball to do it from source. Ideas? TIA, Quincey ________________________________ From: Markus Falb <markus.falb at fasel.at> To: centos at centos.org Sent: Saturday, April 14, 2012 3:10 PM Subject: Re: [CentOS] Changing Python Version On 14.4.2012 20:40, Quincey Robertson wrote:> Hi; > I am trying to change the default version of python on my centos 5.7 box and leave the old installation. Frustrated by not finding any help online, I went ahead and installed Python 2.6 from the source. It appears to be my default, but when I fire up mod_wsgi, it complains that it can't import os. Please advise.hard to tell without error message, but I guess that mod_wsgi is linked to your old python and wont work with another python. Maybe you have to recompile mod_wsgi too? ...snip $ ldd /usr/lib64/httpd/modules/mod_wsgi.so ??? ... ??? libpython2.4.so.1.0 => /usr/lib64/libpython2.4.so.1.0 ??? ... snap... -- Kind Regards, Markus Falb _______________________________________________ CentOS mailing list CentOS at centos.org http://lists.centos.org/mailman/listinfo/centos