Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to install python 3.8 directly in /usr/bin?

Trying to install python 3.8 from source in CentOS 7.9.

The default installed python is 2.7.5 and is located at /usr/bin.

sudo yum install gcc openssl-devel bzip2-devel libffi-devel zlib-devel
sudo cd /opt
sudo wget https://www.python.org/ftp/python/3.8.12/Python-3.8.12.tgz
sudo tar xzf Python-3.8.12.tgz
cd Python-3.8.12
sudo ./configure --enable-optimizations
sudo make install

I thought make install would create python3 in /usr/bin, but it didn’t.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

By default, CPython install compiled python binary in /usr/local/bin/python. (source code: https://github.com/python/cpython/blob/main/configure#L571) You may specify the prefix mannually as configure --prefix=/usr.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading