zonedabone Posted March 3, 2011 Author Posted March 3, 2011 It doesn't look like OSQA needs py2.7. It sould work on 2.4. Of course, 2.7 is more stable.
zonedabone Posted March 5, 2011 Author Posted March 5, 2011 This isn't being dismissed, is it? Python 3.2 works. We just need 2.7 installed the same way, and then a simple reconfigure to wsgi should make django run on 2.7
Guest Geoff Posted March 6, 2011 Posted March 6, 2011 Why can't you use 3.2? It's newer than 2.7, and is probably more robust.
zonedabone Posted March 6, 2011 Author Posted March 6, 2011 Why can't you use 3.2? It's newer than 2.7, and is probably more robust. Py3k is backwards-incompatible with Py2k. This means that many libraries (Including django) do not yet support it fully. Also, it isn't more stable. Python 2.7 is based on years of development whereas python 3.2 is still being developed. In fact, an API freeze is only now being started. Also, I don't think wsgi supports py3k
Ashoat Posted March 6, 2011 Posted March 6, 2011 This isn't being dismissed. I just have to work around some issues because /usr is running out of space and each Python install takes 50 MiB on /usr. I'll probably just move them somewhere in /home1 and symlink the directories, but this'll take a bit more time.
zonedabone Posted March 6, 2011 Author Posted March 6, 2011 This isn't being dismissed. I just have to work around some issues because /usr is running out of space and each Python install takes 50 MiB on /usr. I'll probably just move them somewhere in /home1 and symlink the directories, but this'll take a bit more time. Okay. Thanks!
Ashoat Posted March 6, 2011 Posted March 6, 2011 Okay, I've compiled/altinstalled version 2.7. It should be possible to write CGI scripts using it now. For WSGI: can you give me a run-down of what I'll need to do to get the newer version working?
zonedabone Posted March 6, 2011 Author Posted March 6, 2011 Okay, I've compiled/altinstalled version 2.7. It should be possible to write CGI scripts using it now. For WSGI: can you give me a run-down of what I'll need to do to get the newer version working? I've heard a few different things, but the mod wsgi install page says that it'd be best to reinstall and add a special parameter to ./configure when you're building and installing it. http://code.google.com/p/modwsgi/wiki/Inst...Python_Versions http://code.google.com/p/modwsgi/wiki/Quic...The_Source_Code I've also heard some say that mod wsgi actually is a symlink to a version built for a specific python version and that this can be changed. http://serverfault.com/questions/157854/py...on-for-mod-wsgi
Ashoat Posted March 8, 2011 Posted March 8, 2011 I'm having trouble compiling mod_wsgi for Python 2.7. root@stevie [/home1/src/mod_wsgi-3.3]# ./configure --with-python=/usr/local/bin/python2.7 checking for apxs2... no checking for apxs... /usr/bin/apxs checking Apache version... 2.2.16 configure: creating ./config.status config.status: creating Makefile root@stevie [/home1/src/mod_wsgi-3.3]# make /usr/bin/apxs -c -I/usr/local/include/python2.7 -DNDEBUG mod_wsgi.c -L/usr/local/lib -L/usr/local/lib/python2.7/config -lpython2.7 -lpthread -ldl -lutil -lm /usr/local/apache/build/libtool --silent --mode=compile gcc -prefer-pic -m64 -fPIC -DPIC -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -m64 -fPIC -DPIC -pthread -I/opt/pcre/include -I/usr/local/apache/include -I/usr/local/apache/include -I/usr/local/apache/include -I/usr/local/include/python2.7 -DNDEBUG -c -o mod_wsgi.lo mod_wsgi.c && touch mod_wsgi.slo /usr/local/apache/build/libtool --silent --mode=link gcc -o mod_wsgi.la -rpath /usr/local/apache/modules -module -avoid-version mod_wsgi.lo -L/usr/local/lib -L/usr/local/lib/python2.7/config -lpython2.7 -lpthread -ldl -lutil -lm /usr/bin/ld: /usr/local/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 /usr/local/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 Any idea what this issue is?
zonedabone Posted March 8, 2011 Author Posted March 8, 2011 I'm having trouble compiling mod_wsgi for Python 2.7. root@stevie [/home1/src/mod_wsgi-3.3]# ./configure --with-python=/usr/local/bin/python2.7 checking for apxs2... no checking for apxs... /usr/bin/apxs checking Apache version... 2.2.16 configure: creating ./config.status config.status: creating Makefile root@stevie [/home1/src/mod_wsgi-3.3]# make /usr/bin/apxs -c -I/usr/local/include/python2.7 -DNDEBUG mod_wsgi.c -L/usr/local/lib -L/usr/local/lib/python2.7/config -lpython2.7 -lpthread -ldl -lutil -lm /usr/local/apache/build/libtool --silent --mode=compile gcc -prefer-pic -m64 -fPIC -DPIC -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -m64 -fPIC -DPIC -pthread -I/opt/pcre/include -I/usr/local/apache/include -I/usr/local/apache/include -I/usr/local/apache/include -I/usr/local/include/python2.7 -DNDEBUG -c -o mod_wsgi.lo mod_wsgi.c && touch mod_wsgi.slo /usr/local/apache/build/libtool --silent --mode=link gcc -o mod_wsgi.la -rpath /usr/local/apache/modules -module -avoid-version mod_wsgi.lo -L/usr/local/lib -L/usr/local/lib/python2.7/config -lpython2.7 -lpthread -ldl -lutil -lm /usr/bin/ld: /usr/local/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 /usr/local/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 Any idea what this issue is? I've been accessing all of the python distributions so far via usr/bin/pythonx.x. Try subsituting this in instead of usr/local/bin
Ashoat Posted March 8, 2011 Posted March 8, 2011 Then I get: root@stevie [/home1/src/mod_wsgi-3.3]# ./configure --with-python=/usr/bin/python2.7 checking for apxs2... no checking for apxs... /usr/bin/apxs checking Apache version... 2.2.16 ./configure: line 1788: /usr/bin/python2.7: No such file or directory ./configure: line 1792: /usr/bin/python2.7: No such file or directory ./configure: line 1797: /usr/bin/python2.7: No such file or directory ./configure: line 1811: /usr/bin/python2.7: No such file or directory ./configure: line 1815: /usr/bin/python2.7: No such file or directory ./configure: line 1818: /usr/bin/python2.7: No such file or directory ./configure: line 1821: /usr/bin/python2.7: No such file or directory ./configure: line 1824: /usr/bin/python2.7: No such file or directory ./configure: line 1846: /usr/bin/python2.7: No such file or directory ./configure: line 1850: /usr/bin/python2.7: No such file or directory configure: creating ./config.status config.status: creating Makefile
zonedabone Posted March 8, 2011 Author Posted March 8, 2011 Didn't you install py2.7 somewhere else and then symlink to it? Try using the directory that it is actually installed in.
Ashoat Posted March 8, 2011 Posted March 8, 2011 If it's symlinked, then the real directory will have the same result. Besides, those were the libraries that I relocated... not the binaries. You should probably try Googling this issue or going through some support channel for WSGI.
zonedabone Posted March 9, 2011 Author Posted March 9, 2011 /usr/bin/ld: /usr/local/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 Maybe following those instructions will work. If that doesn't I'll get the google out.
Ashoat Posted March 9, 2011 Posted March 9, 2011 On what, exactly? It's not an option on ./configure or make. It's probably referring to a gcc command in the Makefile, but I don't know which one.
Recommended Posts