Error installing Python

When you press

make install

I get the following error

/usr/bin/install: cannot create regular file /usr/local/bin/python2.6: Permission denied make: *** [altbininstall] Error 1

I am not a root user, so I assume this is a permission issue. I have my own subfolder in. /home/my_usernameIs there a way to complete the python installation there, giving a more specific command, maybe?

Python 2.4 is also installed, how can I make sure I'm actually using 2.6?

Thanks a lot!

+3
source share
1 answer

configurescript allows you to specify --prefix=[dest]. From use:

By default, `make install 'will install all the files in / usr / local / bin, / usr / local / lib, etc. You can specify an installation prefix other than / usr / local with --prefix, for example, --prefix = $ HOME.

, py26 :

% ./configure --prefix=$HOME/py26
..
% make install
% $HOME/py26/bin/python

, $HOME/bin PATH ~/.bashrc ( rc ). , Python , :

% which python
/home/user/py26/bin/python

, --prefix PATH. :

% which python
/usr/bin/python

% ls -1 $HOME/py26/bin/python*
/home/user/py26/bin/python
/home/user/py26/bin/python2.6
/home/user/py26/bin/python2.6-config
/home/user/py26/bin/python-config

% export PATH=$HOME/py26/bin:$PATH
% which python
/home/user/py26/bin/python
+9

All Articles