Jump to content

[Solved] python 2.7 on charlie?


zonedabone

Recommended Posts

  • Replies 31
  • Created
  • Last Reply

Top Posters In This Topic

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

/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. <_<

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.

×
×
  • Create New...