Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Install modules with no root privilegies

Reply
Thread Tools

Install modules with no root privilegies

 
 
Alfons Nonell-Canals
Guest
Posts: n/a
 
      11-24-2008
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://www.velocityreviews.com/forums/(E-Mail Removed) - http://cgl.imim.es
Tel. +34933160528

http://alfons.elmeuportal.cat
http://www.selenocisteina.info

 
Reply With Quote
 
 
 
 
Philipp Pagel
Guest
Posts: n/a
 
      11-24-2008
Alfons Nonell-Canals <(E-Mail Removed)> 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
 
Reply With Quote
 
 
 
 
Diez B. Roggisch
Guest
Posts: n/a
 
      11-24-2008
Philipp Pagel wrote:

> Alfons Nonell-Canals <(E-Mail Removed)> 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
 
Reply With Quote
 
Jorgen Grahn
Guest
Posts: n/a
 
      11-28-2008
On Mon, 24 Nov 2008 20:11:42 +0100, Diez B. Roggisch <(E-Mail Removed)> wrote:
> Philipp Pagel wrote:
>
>> Alfons Nonell-Canals <(E-Mail Removed)> 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!
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
while executing my client program i get the exception javax.naming.LinkException: [Root exception is javax.naming.LinkException: [Root exception is javax.naming.NameNotFoundException: remaining if plz anybody know how to solve this problem then mahesh Java 0 03-08-2007 12:26 PM
non root users accessing application installed with root instance hector C Programming 5 12-05-2006 01:01 PM
SRT DIvision, Square root and reciprocal square root alghazo@siu.edu VHDL 0 05-27-2004 06:23 AM
Tertiary Conditional: what does this evaluate to ("docRoot == null ? this.root : doc root")? Rick Osborn Java 10 02-08-2004 02:25 AM



Advertisments