I’m trying to execute my python code on emacs.
when I try c-c c-c, the following errors occur.
ImportError: No module named siteCould not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
ImportError: No module named site
so I set pythonpath in .emacs file as follows :
(setenv "PYTHONPATH" "/opt/python2.7/bin")
but still error pops.
any idea what’s going on?
You can just install Python 2.7 using the following RPM:
ftp://ftp.pycopia.org/pub/python/centos/5/i386/python2.7-2.7.1-1TH.i386.rpm
It should work on any CentOS 5.x, 32 bit. You don’t have to remove the “stock” Python2.4, this one co-exists with the standard installation. It won’t break your system installing this RPM. You do, however, have to be explicit with the version in your pound-bang line.
There are other RPMs there you might also want to install.