up vote 1 down vote favorite
share [g+] share [fb]

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.

link|improve this question
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
feedback

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

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

3 Answers

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.

link|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
feedback

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.

link|improve this answer
feedback

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

link|improve this answer
1  
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
feedback

Your Answer

 
or
required, but never shown