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

You can change the location using the --prefix option in configure (which defaults to usr/local). Python will be installed under /bin, so if you want it in /usr/bin, you can write:

./configure --prefix=/usr  --enable-optimizations
make
make install

This following commands worked for me :

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

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.

Tags:

Python 3.X