|
How install python 2.5.2 (dreamhost.com) |
|
Written by Administrator
|
|
Thursday, 19 March 2009 |
|
Dreamhost default python 2.4 :( All Python CGI scripts on dreamhost MUST... - end in ".py" (NOTE: ".cgi" works as well)
- have #!/usr/bin/python in the very first line of the file (NOTE: #!/usr/bin/python2.x or #!/usr/bin/env python2.x will work as well)
- be marked as executable: chmod 755
- use UNIX style newlines, not Windows
- If you want to view printed output from your Python code, you must print print "Content-type: text/html\n\n" as the first line of output.
- If you don't want .py files to be executed by Apache add "RemoveHandler .py" command to your .htaccess file
Installation a custom version of Python wget http://python.org/ftp/python/VERSION/Python-2.5.2.tgz tar -xzvf Python-VERSION.tgz cd Python-VERSION ./configure --prefix=$HOME make make install
setuptools cd ${HOME}/soft wget http://peak.telecommunity.com/dist/ez_setup.py ${RUN}/bin/python ez_setup.pycd ${HOME}/soft # download and extract the package wget http://umn.dl.sourceforge.net/sourceforge/swig/swig-1.3.34.tar.gz tar xvzf swig-1.3.34.tar.gz cd swig-1.3.34 # configure, compile and verify ./configure --prefix=${RUN} make make check # you might get some errors about ocaml. # these don't matter (unless you intend to # use this version of SWIG to generate # ocaml bindings too). make install
|
|
Last Updated ( Thursday, 19 March 2009 )
|