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. Advertising

  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. Advertising

  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. 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. Raphael Bossek
    Replies:
    1
    Views:
    306
    Nicholas Wieland
    Aug 21, 2003
  2. Chris Shenton
    Replies:
    1
    Views:
    1,455
    =?ISO-8859-1?Q?Michael_Str=F6der?=
    Aug 24, 2007
  3. ind_123

    Webfarm and msi installation setup

    ind_123, Dec 14, 2007, in forum: ASP .Net
    Replies:
    0
    Views:
    303
    ind_123
    Dec 14, 2007
  4. Abby Lee
    Replies:
    5
    Views:
    436
    Abby Lee
    Aug 2, 2004
  5. Space Ship Traveller

    Learn Ruby - Lesson 0: Setup and Installation

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

Share This Page