Skip to content
Aaron Griffith edited this page Sep 19, 2011 · 12 revisions

CentOS 5.x comes installed with (and requires) Python 2.4 for important system software (like Yum (the package manager)) to function. You can follow these steps to install Python2.6 along-side the normal Python 2.4 installation without endangering the stability of your system.

Easy install method with the EPEL repo

Note that for commands, "#" means to run as root (or via sudo), and "$" means run as a regular user.

  1. Install the EPEL repo. Go to step #2 if you already have the EPEL repo installed.
  2. $ wget http://download.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm
  3. # rpm -Uhv epel-release-5-4.noarch.rpm
  4. Install the python26 packages and build dependancies
  5. # yum groupinstall -y 'Development Tools'
  6. # yum install -y python26{,-imaging,-numpy}{,-devel}
  7. Install and setup Overviewer
  8. $ git clone git://github.com/overviewer/Minecraft-Overviewer.git
  9. $ cd Minecraft-Overviewer
  10. $ python26 setup.py build
  11. Change the first line of overviewer.py from #!/usr/bin/env python to #!/usr/bin/env python26 so that the Python 2.6 interpreter is used instead of the default 2.4
  12. Run Overviewer
  13. $ ./overviewer.py path/to/world/ path/to/output/ or $ python26 path/to/overviewer.py path/to/world/ path/to/output/

Installation from source (YOU PROBABLY DON'T WANT THIS)

  1. Make sure you have a compiler installed: yum groupinstall 'Development Tools'
  2. Download the source for python 2.6.7 wget http://www.python.org/ftp/python/2.6.7/Python-2.6.7.tar.bz2
  3. Extract it tar xjfv Python-2.6.7.tar.bz2
  4. Change into the new source directory cd Python-2.6.7
  5. Configure it to coincide with system python (EXTREMELY IMPORTANT) ./configure --prefix=/opt
  6. Compile it and install it make && make install
  7. In another directory, download PIL wget http://effbot.org/downloads/Imaging-1.1.7.tar.gz
  8. Extract it tar xzfv Imaging-1.1.7.tar.gz
  9. Enter the new source directory cd Imaging-1.1.7
  10. Using the 2.6 binary in opt, build PIL /opt/bin/python setup.py build_ext -i
  11. Test it too (optional but recommended) /opt/bin/python selftest.py
  12. Copy over the libraries so you can compile OverViewer /usr/local/src/Imaging-1.1.7/libImaging/* /opt/include/python2.6/
  13. Install PIL /opt/bin/python setup.py install
  14. In another directory, download the source for numpy svn co http://svn.scipy.org/svn/numpy/trunk numpy
  15. Change directories to the source cd numpy/
  16. Using the 2.6 binary build numpy /opt/bin/python setup.py build
  17. And install it /opt/bin/python setup.py install
  18. In another directory, download Overviewer git clone git://github.com/overviewer/Minecraft-Overviewer.git
  19. Change to that directory cd Minecraft-Overviewer/
  20. Replace the first line of overviewer.py with: #!/usr/bin/env python26
  21. Copy terrain.png to your Minecraft-Overviewer directory
  22. Compile the c module for overviewer, again with 2.6 binary /opt/bin/python setup.py build
  23. Make sure your server isn't running and enjoy ./overviewer.py ../$WORLDFOLDER $DESTFOLDER

Problems and Solutions

  • I receive OSError: [Errno 13] Permission denied error when I run Overviewer!
    • Run this ls -l /dev/ | grep shm
    • If you see drwxr-xr-x instead of drwxrwxrwx then you have two options.
      1. Run overviewer as a single process with -p 1, or
      2. Have your server administrator update the fstab.
  • Overviewer reports a syntax error
    • Make sure you're using the right version of python. Specifically, either follow step #3.4 or #20 above ("Replace the first line of overviewer.py..."), or make sure that you're using "python26 overviewer.py ..." and _not _"python overviewer.py ..."
  • I have other issues
    • Every other issue that I've come across is mentioned in the documentation in README.rst

Clone this wiki locally