Install modules with no root privilegies

Discussion in 'Python' started by Alfons Nonell-Canals, Nov 24, 2008.

  1. Hello,
    Install python modules in a linux computer is really easy, it is because
    the module is a package of the distribution or because the python
    installation is really easy. But, in both situations, you need root
    privilegies.

    I would like to know how to install modules only for one user, with no
    root privilegies. Do you know if it is possible and easy. I would like
    to add that i need some modules only for my user and incly for one
    progam.

    Thanks in advance!

    Alfons.

    --
    ------------
    Alfons Nonell-Canals, PhD
    Chemogenomics Lab
    Research Group on Biomedical Informatics (GRIB) - IMIM/UPF
    Barcelona Biomedical Research Park (PRBB)
    C/ Doctor Aiguader, 88 - 08003 Barcelona
    - http://cgl.imim.es
    Tel. +34933160528

    http://alfons.elmeuportal.cat
    http://www.selenocisteina.info
    Alfons Nonell-Canals, Nov 24, 2008
    #1
    1. Advertising

  2. Alfons Nonell-Canals <> wrote:
    > Install python modules in a linux computer is really easy, it is because
    > the module is a package of the distribution or because the python
    > installation is really easy. But, in both situations, you need root
    > privilegies.


    > I would like to know how to install modules only for one user, with no
    > root privilegies. Do you know if it is possible and easy.


    Yes, there is. You can choose among two strategies referred to as "home scheme"
    and "prefix scheme" in the "Installing Python Modules" documentation:

    http://docs.python.org/install/index.html

    Have a look at Section 3 "Alternate installation".

    cu
    Philipp

    --
    Dr. Philipp Pagel
    Lehrstuhl f. Genomorientierte Bioinformatik
    Technische Universit√§t M√ľnchen
    http://mips.gsf.de/staff/pagel
    Philipp Pagel, Nov 24, 2008
    #2
    1. Advertising

  3. Philipp Pagel wrote:

    > Alfons Nonell-Canals <> wrote:
    >> Install python modules in a linux computer is really easy, it is because
    >> the module is a package of the distribution or because the python
    >> installation is really easy. But, in both situations, you need root
    >> privilegies.

    >
    >> I would like to know how to install modules only for one user, with no
    >> root privilegies. Do you know if it is possible and easy.

    >
    > Yes, there is. You can choose among two strategies referred to as "home
    > scheme" and "prefix scheme" in the "Installing Python Modules"
    > documentation:
    >
    > http://docs.python.org/install/index.html
    >
    > Have a look at Section 3 "Alternate installation".


    That's waaaaaaaaay much more than is actually needed, as thus each user
    would end up with a different installation.

    Setting the PYTHONPATH-env-variable to a user writable location allows e.g.
    easy_install and friends to install into that location. And installing
    virtualenv globally, everybody can create a "local"
    site-packages-directory.

    Diez
    Diez B. Roggisch, Nov 24, 2008
    #3
  4. Alfons Nonell-Canals

    Jorgen Grahn Guest

    On Mon, 24 Nov 2008 20:11:42 +0100, Diez B. Roggisch <> wrote:
    > Philipp Pagel wrote:
    >
    >> Alfons Nonell-Canals <> wrote:
    >>> Install python modules in a linux computer is really easy, it is because
    >>> the module is a package of the distribution or because the python
    >>> installation is really easy. But, in both situations, you need root
    >>> privilegies.

    >>
    >>> I would like to know how to install modules only for one user, with no
    >>> root privilegies. Do you know if it is possible and easy.

    >>
    >> Yes, there is. You can choose among two strategies referred to as "home
    >> scheme" and "prefix scheme" in the "Installing Python Modules"
    >> documentation:
    >>
    >> http://docs.python.org/install/index.html
    >>
    >> Have a look at Section 3 "Alternate installation".

    >
    > That's waaaaaaaaay much more than is actually needed, as thus each user
    > would end up with a different installation.


    The "home scheme", you mean. It seems to me that this is exactly what
    the poster wants -- mess with a bunch of modules without having to
    consider anyone else's needs.

    > Setting the PYTHONPATH-env-variable to a user writable location allows e.g.
    > easy_install and friends to install into that location.


    Yes, but the users have to trust everyone with write access to that
    place. Someone could replace a module with a trojan horse, or simply
    with a newer version which isn't compatible, and things would break.

    Sometimes this is OK, but sometimes you only trust root and yourself.

    > And installing
    > virtualenv globally, everybody can create a "local"
    > site-packages-directory.


    Cannot comment -- I haven't used it.

    /Jorgen

    --
    // Jorgen Grahn <grahn@ Ph'nglui mglw'nafh Cthulhu
    \X/ snipabacken.se> R'lyeh wgah'nagl fhtagn!
    Jorgen Grahn, Nov 28, 2008
    #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. Replies:
    0
    Views:
    1,214
  2. gbarn
    Replies:
    2
    Views:
    2,100
    gbarn
    Mar 22, 2006
  3. Rick Osborn
    Replies:
    10
    Views:
    3,953
    Jon A. Cruz
    Feb 8, 2004
  4. hector
    Replies:
    5
    Views:
    410
    CBFalconer
    Dec 5, 2006
  5. sravi
    Replies:
    9
    Views:
    133
    Joe Smith
    May 24, 2005
Loading...

Share This Page