embedding python in macOS 10.6

Discussion in 'Python' started by tinauser@libero.it, Sep 29, 2010.

  1. Guest

    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
     
    , Sep 29, 2010
    #1
    1. Advertising

  2. Aahz Guest

    [posted & e-mailed]

    In article <>,
    <> wrote:
    >
    >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.
    --
    Aahz () <*> http://www.pythoncraft.com/

    "If you think it's expensive to hire a professional to do the job, wait
    until you hire an amateur." --Red Adair
     
    Aahz, Oct 28, 2010
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Michael J. Fromberger

    Python 2.5 and Unicode on MacOS

    Michael J. Fromberger, Sep 21, 2006, in forum: Python
    Replies:
    1
    Views:
    291
    Peter Otten
    Sep 21, 2006
  2. Graham Dumpleton
    Replies:
    3
    Views:
    282
    Martin v. Löwis
    Mar 10, 2009
  3. silverburgh

    Install Python 3.0 dmg to macos 10.5

    silverburgh, May 6, 2009, in forum: Python
    Replies:
    1
    Views:
    275
    Diez B. Roggisch
    May 6, 2009
  4. Jean Guillaume Pyraksos

    Python IDE for MacOS-X

    Jean Guillaume Pyraksos, Jan 19, 2010, in forum: Python
    Replies:
    3
    Views:
    949
    Günther Dietrich
    Jan 19, 2010
  5. Replies:
    0
    Views:
    242
Loading...

Share This Page