llkaposts.blogg.se

Python install linux
Python install linux











python install linux

We are going to update the environment variables to force the shell to use our new python. By the default, if we type python command, it will use the default python of the system. The value of prefix option is to specify where to put the related output of make command, by default it is in the /usr/local/ and we don't want that so we use our own customized directory. Notice the prefix option, it is mandatory for this to work. Then I compiled the source following its guideline. The detailed steps are as follows:įirstly, I create a folder in my home directory, download the python source and extract it mkdir ~/python Even though this blog aims for python 2.7, I believe it should also be the same for python 3.0.

python install linux

The only solution was to install the python 2.7 into my local directory and override the necessary environment variables. As you can see, it was impossible for me to upgrade python on the system because I had no root permission. My goal was to run a program developed under python 2.7 on the Linux server which already had python 2.6 installed. After a bit of search and trial, I was able to install a newer version of python on this machine to my local directory. That machine was shared with many other users and there was only an old python version already installed on the machine. A few days ago, I was struggling to install python on a Linux machine, in which I had no root permission.













Python install linux