Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how do I install python2 on centos 9 stream?

I am trying to figure out how to install python2 on centos9 stream. I am getting the errors below. Any suggestions?

sudo dnf install python2

Last metadata expiration check: 0:04:48 ago on Thu 24 Feb 2022 01:43:10 PM EST.

No match for argument: python2

Error: Unable to find a match: python2
like image 1000
Joelio Avatar asked Jul 26 '26 04:07

Joelio


1 Answers

Yes, you can, using this method:

If you cannot find a package for your distribution (and you probably should be able to), you can download a single-file executable "AppImage" containing Python 2.7 and the standard library. Just download the file, make it executable, rename it "python2" or create a symlink of that name pointing to the AppImage file, and put it in /usr/local/bin/, and getmail will happily run with it.

For example, on an x86_64 Linux system, you could:

wget https://github.com/niess/python-appimage/releases/download/python2.7/python2.7.18-cp27-cp27m-manylinux1_x86_64.AppImage
sudo install -m 755 python2.7.18-cp27-cp27m-manylinux1_x86_64.AppImage /usr/local/bin/
sudo ln -sr /usr/local/bin/python2.7.18-cp27-cp27m-manylinux1_x86_64.AppImage /usr/local/bin/python2

Source: https://pyropus.ca/software/getmail/documentation.html#python3

like image 192
Diogo Braga Avatar answered Jul 29 '26 15:07

Diogo Braga



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!