Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to install python 3.x version in /usr/bin/?

Tags:

python-3.x

I downloaded python 3.6 installation file (tgz file).

I installed it the following way:

$ ./configure
$ make
$ su root
Password: 
$ make install

Then, python installed in /usr/local/bin but I want to install python in /usr/bin.

How can I do that?

like image 914
newbie16 Avatar asked Jun 17 '17 03:06

newbie16


People also ask

How do I install Python on usr bin?

Install your “dev” Python into /usr/local/python-x.y.z or a similar location. Setup your shell (e.g. path variable and aliases) so that “python” and “python3” will run your preferred version. In scripts, use #!/usr/bin/python3 to run with system Python. Use #!/usr/bin/env python3 to run with your dev version.


2 Answers

There should be an option '--prefix' so that

> ./configure --prefix=/usr
> make
> sudo make install

should do the job. Otherwise, search for 'usr/local/bin' in the configuration script and replace accordingly.

like image 102
Frank-Rene Schäfer Avatar answered Sep 27 '22 19:09

Frank-Rene Schäfer


This following commands worked for me :

./configure --prefix=/usr
make
make install
like image 20
pcmanprogrammeur Avatar answered Sep 27 '22 19:09

pcmanprogrammeur