You can also download latest version in place of. You have successfully upgrade your python version 2.6 to 2.7 on centos. Download Python using following command from python official site. #Exit your current shell prompt and reopen if you are not able to view this output Python-2.7]$python -V #Use UPPERCASE ‘V’ – not lower-case. Python 3.8 isnt available in the CentOS and Fedora repositories. The installer will look like this: Clicking on the button will replace the existing version of Python with the new version. Installing or updating Python on your computer is the first step to becoming a Python. If you’re updating to a new patch of Python (3.x.a to 3.x.b), when you run the installer, it will prompt you to Upgrade Now. Itll install the given version without replacing the default/existing version. But still, we can install the latest python versions through make altinstall command. Because most of the Linux functions uses python. # Use the command below to display which path of python is currently active All you have to do is visit the Python downloads page and download the latest version. Upgrading default python on Linux is a very critical operation. # Exit from your shell and open a new shell/SSH session #./configure –prefix=/opt/python2.7 –with-threads –enable-shared I have written a quick guide on how to install the latest versions of Python 2 and Python 3 on CentOS 6 and CentOS 7. To make it the default Python version, you need to run the update-alternatives command as described at the bottom of this page. #you could also run configure with threads and shared enabled python3 -version Python 3.4.10 Note: This isn’t the default Python version on your system. #read README file or you can follow the lines below Switch directory to / usr/local root chenc01 cd /usr/local/ root chenc01 local ls bin etc games include lib lib64 libexec sbin share src 2. #Download the latest available at this timeĭownload]$ tar xfz Python-2.7.tgz #Change Directory to the unzipped folder Next download the latest tar/gzip/tgz available here: ~]$ sudo yum -y install bzip2 bzip2-devel bzip2-libs ~]$ sudo yum -y groupinstall ‘Development Tools’ ~]$ sudo yum -y install openssl-devel* ncurses-devel* zlib*.x86_64 I have to install Develop Tools, it is a required dependency to install Python. The below is a step by step procedure for how to upgrade to Python 2.7 on CentOS 6.5. Today, I think to upgrade my python version 2.6 to 2.7 on CentOS-6 because of some application requirement so I tried to search on Google How to upgrade python 2.6 to 2.7 on CentOS-6 but I haven’t found any easy way like RPM or YUM.
0 Comments
Leave a Reply. |