embedding python in macOS 10.6

T

tinauser

hi there,

i'm trying to embed python in a c++ code.i'm starting with the example in the
tutorial.i've problem with setting up the enveiroment.
I've installed python with the distributed version (i.e., i did not, as a
start, build it myself); i added the library where both python.h and pyconfig
are stored and i linked to libpython2.6.a (which is, in the distributed
version, an alias).
the program builds and links correctely, but if I try to run it, i get the
following error:

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
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: No module named time

what is the problem?

in my .profile i have set PATH: /Library/Frameworks/Python.
framework/Versions/2.6/bin
 
A

Aahz

[posted & e-mailed]

i'm trying to embed python in a c++ code.i'm starting with the example in the
tutorial.i've problem with setting up the enveiroment.
I've installed python with the distributed version (i.e., i did not, as a
start, build it myself); i added the library where both python.h and pyconfig
are stored and i linked to libpython2.6.a (which is, in the distributed
version, an alias).

For Mac you probably want to build Python yourself, but I'm certainly not
an expert. If you still haven't figured it out, try pythonmac-sig.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,772
Messages
2,569,593
Members
45,110
Latest member
OdetteGabb
Top