PYTHONPATH x *.pth???

Discussion in 'Python' started by Carlos Moreira, Sep 4, 2003.

  1. I want to install Python third packages in a
    non-default directory.
    What´s the better way?

    - PYTHONPATH variable?
    - *.pth files in site-packages?

    I know that the two methos above are equivalents. But
    what method will be keep in future Python releases
    (for example)?

    []´s

    Cadu


    __________________________________
    Do you Yahoo!?
    Yahoo! SiteBuilder - Free, easy-to-use web site design software
    http://sitebuilder.yahoo.com
    Carlos Moreira, Sep 4, 2003
    #1
    1. Advertising

  2. Carlos Moreira wrote:

    > I want to install Python third packages in a
    > non-default directory.
    > What´s the better way?
    >
    > - PYTHONPATH variable?
    > - *.pth files in site-packages?


    It depends on your requirements. For example:

    - Why is it that you don't want to install the
    packages in the default directory? Then, considering
    that reason, why would it be acceptable to install
    a .pth file there?

    - Is it acceptable that users of your application set
    PYTHONPATH?

    - Do you have to consider multiple installations of Python

    And so on.

    You should also consider a third alternative:

    - Extend sys.path explicitly in the application,
    before importing the third package.

    > I know that the two methos above are equivalents. But
    > what method will be keep in future Python releases
    > (for example)?


    Both with be kept indefinitely.

    Regards,
    Martin
    =?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=, Sep 4, 2003
    #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. Carlos Moreira

    PYTHONPATH x *.pth???

    Carlos Moreira, Sep 4, 2003, in forum: Python
    Replies:
    0
    Views:
    293
    Carlos Moreira
    Sep 4, 2003
  2. dave

    python-2.3.2 and pth

    dave, Nov 13, 2003, in forum: Python
    Replies:
    1
    Views:
    297
    Martin v. =?iso-8859-15?q?L=F6wis?=
    Nov 15, 2003
  3. Replies:
    0
    Views:
    278
  4. .pth files?

    , Mar 22, 2005, in forum: Python
    Replies:
    5
    Views:
    4,723
    Skip Montanaro
    Mar 24, 2005
  5. Replies:
    2
    Views:
    534
Loading...

Share This Page