Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is it possible to update python without root access, this is the first time using red hat linux (any linux for that matter) and the default version is python 2.3 which breaks some of my code that i tested on python 2.6.

i tried building from source but it said i needed root access.

share|improve this question

migrated from stackoverflow.com Dec 3 '09 at 19:45

This question came from our site for professional and enthusiast programmers.

    
For what exactly is it needing root access? You should be able to make and make install python as long as you stay in your $HOME-dir. –  halfdan Dec 3 '09 at 11:24

3 Answers 3

How did you compile the source? If you did ./configure, do this instead:

./configure --prefix=$HOME
make
make install

($HOME should expand to something like /home/burisum.) In this way the third step (make install) will install the files in your homedir and you will not need root access.

share|improve this answer
    
i tried this but i get the message, permission denied –  burlsm Dec 3 '09 at 12:14
    
Can you show that error message and some (say, 5) of the lines before it? –  Stephan202 Dec 3 '09 at 12:19

You can make a "user" installation i.e. in your ~ directory.

Make sure you update your .bashrc (or equivalent) to insert the path to your interpreter in front of /usr/bin if you intend for your interpreter to serve as default for your session though.

share|improve this answer

this is the error i'm getting

/usr/bin/install -c python /bin/python2.6
/usr/bin/install: cannot create regular file `/bin/python2.6': 
Permission deniedmake: *** [altbininstall] Error 1

added this here, so that it could be formatted

edit: I just got it installed, it missed a / at the end of the path

i tried this and it worked,

./configure --prefix=/home/sam/

instead of

./configure --prefix=/home/sam.

thanks a lot to everyone who answered

share|improve this answer
2  
This is NOT an answer. This is additional data for your question. (1) Update your question with this information. (2) Delete this non-answer. –  S.Lott Dec 3 '09 at 17:10

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.