embedding python without dynamically lodaed code in <prefix>

Samuel D. Gendler sgendler at akamai.com
Fri Apr 13 00:35:59 EDT 2001


I am using libpython.a (2.0, if you must know) in order to gain access
to all of the nifty Python data structures.  Currently, we use ONLY the
C api.  The application gets distributed to several thousand servers
around the planet, none of which have any version of python installed,
let alone 2.0, and we really have no interest in doing a python install
to several thousand servers.  

When I call PyInitialize() on a machine that does not have python2.0
installed, it complains like so:

Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
'import site' failed; use -v for traceback

I don't really care that the import fails (assuming that the
PyInitialize still succeeds. I haven't checked the source yet), but it
would be really nice to be able to supress these error messages,
especially if they are having a negative impact on PyInitialize.

Any suggestions would be much appreciated.  Please respond to my email
as well as any public forum that this might arrive at.

--sam




More information about the Python-list mailing list