简体   繁体   中英

Change the python version after installing django

I am trying to install mod_wsgi and django. When i "make" mod_wsgi then i get error if i use python2.7 but it went ok with default python.

i already wasted much time to figure that but could not solve it.

I just wanted to know that if continue with default python and install Django then can i change the python to 2.7 later

EDIT: CENTOS5.5 The error i get is

/usr/bin/ld: /opt/python27/lib/libpython2.7.a(node.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC /opt/python27/lib/libpython2.7.a: could not read symbols: Bad value collect2: ld returned 1 exit status apxs:Error: Command failed with rc=65536. make: * [mod_wsgi.la] Error 1

this all heppens if i do

"make" in mod_wsgi directory

Now this error is written on their help site

But i could not configure these things.

According to them

If the version of Python being used was compiled for X86 64 bit architecture and a shared library does exist, but not in the 'config' directory, then adding the missing symlink may be all that is required.

i have found that my python version is 64bit. So the only thing left is the other option he talked in above text.

I don't know how to

1) Check if shared library does exist
2) How to add the missing symlink

If i make the mos_wsgi using default python then i get no error.

I just wanted to know that if continue with default python and install Django then can i change the python to 2.7 later

Yes. Upgrades are permitted. AFAIK, there's no law that says you are not permitted to upgrade. Indeed, why ask if an upgrade is possible? Have you been told that you're not permitted to upgrade?

Use the default Python.

Learn Python. Do the entire tutorial.

Install Django.

Learn Django. Do the entire tutorial.

When you go to install mod_wsgi (which you should not do first) please search for CentOS and mod_wsgi. Search is an important skill.

Problem with Django setup using mod_wsgi and apache on centos 5.4

http://library.linode.com/frameworks/django-apache-mod-wsgi/centos-5

And upgrades are permitted. Don't ask for permission. Search for relevant issues.

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