Installing packages

Discussion in 'Python' started by Alan Baljeu, Nov 13, 2008.

  1. Alan Baljeu

    Alan Baljeu Guest

    I'm new to Python, and just downloaded Py2.6. I also want to use Nose. So I downloaded the latest sources, but it's not at all clear what's the best way to put this stuff into the Python package system. Nose supports easy_install, easy_install doesn't have an installer for Windows and Py2.6, so I think I can't use that. (It only does 2.5 and earlier. (Should I go to Py2.5? Is there more support out there for that?)).


    Alan Baljeu


    __________________________________________________________________
    Ask a question on any topic and get answers from real people. Go to Yahoo! Answers and share what you know at http://ca.answers.yahoo.com
    Alan Baljeu, Nov 13, 2008
    #1
    1. Advertising

  2. Alan Baljeu schrieb:
    > I'm new to Python, and just downloaded Py2.6. I also want to use Nose. So I downloaded the latest sources, but it's not at all clear what's the best way to put this stuff into the Python package system. Nose supports easy_install, easy_install doesn't have an installer for Windows and Py2.6, so I think I can't use that. (It only does 2.5 and earlier. (Should I go to Py2.5? Is there more support out there for that?)).


    2.6 is most probably a bit to fresh.

    I'd go for 2.5.


    Diez
    Diez B. Roggisch, Nov 13, 2008
    #2
    1. Advertising

  3. Alan Baljeu

    Alan Baljeu Guest

    embedding python

    Thanks, I have 2.5 now and it works great with Nose. Now for my next project, I want to embed Python and Nose in a C++ program. I know this means using the python25.dll, and I know how to setup the calls.
    I think though I will not be installing Python on target systems, so I don't want to rely on sys.path including "site-install". I would have a directory with appropriate python files, a subdir for nose, and keep those relative to the application dir.

    For the Python interpreter, two questions:
    1. What is the best way to manage the import paths?
    2. How can I invoke an interactive console for this embedded python? I'd like to play with things while my app is running.





    ----- Original Message ----
    From: Diez B. Roggisch <>
    To:
    Sent: Thursday, November 13, 2008 2:41:03 PM
    Subject: Re: Installing packages

    Alan Baljeu schrieb:
    > I'm new to Python, and just downloaded Py2.6. I also want to use Nose. So I downloaded the latest sources, but it's not at all clear what's the best way to put this stuff into the Python package system. Nose supports easy_install, easy_install doesn't have an installer for Windows and Py2.6, so I think I can't use that. (It only does 2.5 and earlier. (Should I go to Py2.5? Is there more support out there for that?)).


    2.6 is most probably a bit to fresh.

    I'd go for 2.5.


    __________________________________________________________________
    Ask a question on any topic and get answers from real people. Go to Yahoo! Answers and share what you know at http://ca.answers.yahoo.com
    Alan Baljeu, Nov 13, 2008
    #3
  4. Alan Baljeu

    Guest

    On Nov 13, 2:25 pm, Alan Baljeu <> wrote:
    > I'm new to Python, and just downloaded Py2.6.  I also want to use Nose.  So I downloaded the latest sources, but it's not at all clear what's the best way to put this stuff into the Python package system.  Nose supports easy_install, easy_install doesn't have an installer for Windows and Py2..6, so I think I can't use that.  (It only does 2.5 and earlier.  (Should I go to Py2.5?  Is there more support out there for that?)).  
    >
    > Alan Baljeu

    You are the second poster today concerned about the lack of setuptools
    for Py2.6
    All you have to do is download the setuptools source and run:
    C:\Python26\python setup.py install

    You'll need a compatible compiler (Visual Studio Express 2008 works
    fine) but if you're running Python on Windows you should have that
    anyway or you'll forever be at the mercy of the packagers.
    , Nov 13, 2008
    #4
  5. Re: embedding python

    En Thu, 13 Nov 2008 19:41:44 -0200, Alan Baljeu <>
    escribió:

    > Thanks, I have 2.5 now and it works great with Nose. Now for my next
    > project, I want to embed Python and Nose in a C++ program. I know this
    > means using the python25.dll, and I know how to setup the calls.
    > I think though I will not be installing Python on target systems, so I
    > don't want to rely on sys.path including "site-install". I would have a
    > directory with appropriate python files, a subdir for nose, and keep
    > those relative to the application dir.
    >
    > For the Python interpreter, two questions:
    > 1. What is the best way to manage the import paths?


    If you mimic a tipical Python installation layout in your application
    (don't have to include everything, only what you need) and you call
    Py_SetProgramName at the very beginning of your program, then the default
    rules for building sys.path will work.
    (Mmm, I can't find out where exactly those rules are explained).

    > 2. How can I invoke an interactive console for this embedded python?
    > I'd like to play with things while my app is running.


    Looks like PyRun_InteractiveOne and PyRun_InteractiveLoop should work for
    you, but I've never used them.

    --
    Gabriel Genellina
    Gabriel Genellina, Nov 15, 2008
    #5
    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. Paul  Smith
    Replies:
    0
    Views:
    718
    Paul Smith
    Nov 18, 2003
  2. Greg Fortune

    Installing many packages

    Greg Fortune, Jul 22, 2003, in forum: Python
    Replies:
    0
    Views:
    274
    Greg Fortune
    Jul 22, 2003
  3. Greg Fortune

    Installing lots of packages

    Greg Fortune, Jul 22, 2003, in forum: Python
    Replies:
    1
    Views:
    325
    Greg Fortune
    Jul 22, 2003
  4. David Lyon
    Replies:
    19
    Views:
    557
    David Lyon
    Apr 24, 2009
  5. Ian
    Replies:
    3
    Views:
    158
Loading...

Share This Page