Re: mac osx how to use a specific python environment

Discussion in 'Python' started by Philip Semanchuk, Jan 7, 2009.

  1. On Jan 7, 2009, at 7:27 AM, marco kuhn wrote:

    > hi,
    >
    > I would like to use a specific python environment in a script .
    > The script is load as a plugin by a program which offer a python api .
    > The python environment is build in.
    >
    > How can I use the standard python environment.
    > Can i explicit load the env in my python script.


    Hi Marco,
    I'm not exactly sure what you want to do. But if you execute `python`
    at the command line, OS X will launch whatever version of Python it
    finds first in your PATH.

    Hope this helps
    Philip
     
    Philip Semanchuk, Jan 7, 2009
    #1
    1. Advertising

  2. Philip Semanchuk

    Markus Falb Guest

    On Wed, 07 Jan 2009 10:07:18 -0500, Philip Semanchuk wrote:

    > On Jan 7, 2009, at 7:27 AM, marco kuhn wrote:
    >
    >> hi,
    >>
    >> I would like to use a specific python environment in a script . The
    >> script is load as a plugin by a program which offer a python api . The
    >> python environment is build in.
    >>
    >> How can I use the standard python environment. Can i explicit load the
    >> env in my python script.

    >
    > Hi Marco,
    > I'm not exactly sure what you want to do. But if you execute `python` at
    > the command line, OS X will launch whatever version of Python it finds
    > first in your PATH.


    also, with unix you can set a "per script" interpreter in the first line
    of the script
    #!/usr/bin/env python2.5
    or
    #!/usr/bin/python2.3
    or
    #!/usr/bin/python
    or something like that should do the trick.
    however, i'm also not exactly sure what you want to do.
    i dont think its possible to switch the interpreter in case you import
    your plugin as a module

    best regards, markus
     
    Markus Falb, Jan 9, 2009
    #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. Christopher Mahan
    Replies:
    1
    Views:
    453
    Simon Burton
    Nov 16, 2003
  2. edadk

    Problem with Python on MAC OSX

    edadk, Jun 29, 2004, in forum: Python
    Replies:
    4
    Views:
    478
    Ronald Oussoren
    Jun 30, 2004
  3. Sven Hilmahr
    Replies:
    0
    Views:
    334
    Sven Hilmahr
    Sep 23, 2004
  4. MichaelW
    Replies:
    1
    Views:
    570
    Kevin Walzer
    Nov 23, 2005
  5. Nainto
    Replies:
    7
    Views:
    505
Loading...

Share This Page