Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Python 2.5.2 (r252:60911, Aug 8 2009, 17:18:03)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-44)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import re
>>> import operator
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named operator
Could not find platform dependent libraries <exec_prefix> Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>] Python 2.5.2
Share
Module
operatorshould come from fileoperator.so, presumably in/usr/local/lib/lib-dynloadin your case since that seems to be where you’ve installed things. So what .so files are in that directory?Assuming operator.so is indeed missing (i.e., assuming it’s not some trivial case of wrong permissions on some directory or file) the best way to “get it back” is no doubt, as a comment already suggested, to reinstall Python 2.5 (assuming you need that release e.g. to work with app engine) from either an official Python package at python.org, or an official CentOS 5.3 one (if one exists — I believe CentOS 5.3 uses Python 2.4 as the official /usr/bin/python but there may be RPMs to place 2.5 somewhere else).