Abhishek K Suresh
Abhishek K Suresh

Reputation: 53

How do I install Python Versions 3.6,3.7,3.8,3.9,3.10 on OpenSuse 15.4/15.5?

I need to install all 5 Python versions from 3.6 to 3.10 on 6 different linux OSes. For Ubuntu, I'm doing this:

sudo apt-get install -y software-properties-common
sudo add-apt-repository --yes ppa:deadsnakes/ppa

# Installing all the required Python Versions
sudo apt-get install python3.6 python3.7 python3.8 python3.9 python3.10 -y

and it's working fine. For RHEL and Suse, I was doing this:

versions=("3.6.15" "3.7.12" "3.8.12" "3.9.7" "3.10.0")

# Install each version using a for loop
for version in "${versions[@]}"
do
    # Download source code
    wget https://www.python.org/ftp/python/$version/Python-$version.tgz
    tar -xf Python-$version.tgz
    cd Python-$version

    # Configure and install
    ./configure --enable-optimizations
    make -j 4
    sudo make altinstall

this is working on RHEL, but not working on Suse. Why is it not working on SUSE, and what's the alternative that I can use?

sudo zypper ar obs://python/python:3.7 python37
sudo zypper in python37

zypper install is giving me this Error: enter image description here

Upvotes: 0

Views: 694

Answers (1)

Dead Pool
Dead Pool

Reputation: 11

No idea why it's not working for you, but,

Try this alternate method: sudo zypper ar -f obs://devel:languages:python/python devel_python sudo zypper ref sudo zypper in python37

Upvotes: 1

Related Questions