setup.py installation and module search path

Discussion in 'Python' started by Russ, Feb 20, 2007.

  1. Russ

    Russ Guest

    When I run setup.py to install a pure python package, is it supposed
    to
    automatically set my search path to find the installed modules? Or am
    I
    supposed to set my PYTHONPATH variable myself in my .bashrc file?

    And what if I don't have root priviledge? Then what is supposed to
    happen? Can anyone give me a clue? Thanks.
     
    Russ, Feb 20, 2007
    #1
    1. Advertisements

  2. Russ

    Larry Bates Guest

    Russ wrote:
    > When I run setup.py to install a pure python package, is it supposed
    > to
    > automatically set my search path to find the installed modules? Or am
    > I
    > supposed to set my PYTHONPATH variable myself in my .bashrc file?
    >
    > And what if I don't have root priviledge? Then what is supposed to
    > happen? Can anyone give me a clue? Thanks.
    >

    I'm no expert, but I think what normally happens is the module gets
    installed into ../pythonxx/lib/site-packages/<module> and if it
    installs __init__.py file there they get automatically searched.
    At least that the way things work for me.

    -Larry
     
    Larry Bates, Feb 20, 2007
    #2
    1. Advertisements

  3. Russ

    Russ Guest

    Larry Bates wrote:

    > I'm no expert, but I think what normally happens is the module gets
    > installed into ../pythonxx/lib/site-packages/<module> and if it
    > installs __init__.py file there they get automatically searched.
    > At least that the way things work for me.


    But if I don't have root priviledge, that doesn't happen. Is there a
    setup.py option to get a
    package installed just in my own account in such a way that my module
    search path gets
    updated?
     
    Russ, Feb 20, 2007
    #3
  4. En Tue, 20 Feb 2007 20:56:13 -0300, Russ <>
    escribió:

    >> I'm no expert, but I think what normally happens is the module gets
    >> installed into ../pythonxx/lib/site-packages/<module> and if it
    >> installs __init__.py file there they get automatically searched.
    >> At least that the way things work for me.

    >
    > But if I don't have root priviledge, that doesn't happen. Is there a
    > setup.py option to get a
    > package installed just in my own account in such a way that my module
    > search path gets
    > updated?


    Use the --home option (or --prefix). You may need to set the PYTHONPATH
    environment variable to ~/lib/python

    --
    Gabriel Genellina
     
    Gabriel Genellina, Feb 21, 2007
    #4
    1. Advertisements

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. Raphael Bossek
    Replies:
    1
    Views:
    367
    Nicholas Wieland
    Aug 21, 2003
  2. Stephen Ferg

    what is Python's module search path?

    Stephen Ferg, Jan 8, 2004, in forum: Python
    Replies:
    3
    Views:
    746
    Rene Pijlman
    Jan 9, 2004
  3. Ajay

    module search path

    Ajay, Jul 30, 2004, in forum: Python
    Replies:
    1
    Views:
    356
    angel
    Jul 30, 2004
  4. Ron Adam
    Replies:
    3
    Views:
    613
    Ron Adam
    Aug 2, 2005
  5. aznach
    Replies:
    1
    Views:
    299
    Thomas Guettler
    Oct 17, 2006
  6. ind_123

    Webfarm and msi installation setup

    ind_123, Dec 14, 2007, in forum: ASP .Net
    Replies:
    0
    Views:
    363
    ind_123
    Dec 14, 2007
  7. Abby Lee
    Replies:
    5
    Views:
    713
    Abby Lee
    Aug 2, 2004
  8. Space Ship Traveller

    Learn Ruby - Lesson 0: Setup and Installation

    Space Ship Traveller, Mar 24, 2010, in forum: Ruby
    Replies:
    3
    Views:
    178
    Jesús Gabriel y Galán
    Mar 24, 2010
Loading...