I just installed a fresh openSUSE Leap 15.2. After the update, the Python 3 version is 3.6.12. I need version **3.8.**x without affecting the system-installed Python version, so I’m planning to do this via virtualenv.
What is the best way to do this?
I planned on downloading Python 3.8 from THIS LINK under “Grab binary packages directly”. What I don’t know is if installing this .rpm with YaST will overwrite the baseline Python 3 installation.
If I can install this package into a dedicated place in my home directory (without messing up the baseline Python), I can proceed with the **virtualenv **setup.
Hello again. So here’s my update.
 The link you referenced was for for using venv (which I initially considered). The problem is that the virtual environments that venv creates are of the same version as the system installation of Python. Since I have 3.6.12 and want 3.8.x, that won’t work - hence my choice to use virtualenv.
 Regarding virtualenv, yes I have the option to install it from one of the default repositories. That in itself is not an issue for me, it’s the fact that virtualenv expects the desired Python version (**3.8.x **in my case) to be already installedsomewhere in the computer. It then points to it when creating the virtual environments.
My problem is how to install Python 3.8 “somewhere” without messing up the default Python installation. I thought that by downloading the .rpm myself I could somehow install it in some directory of mine and proceeding. I just don’t know how (or if you can even do that with a .rpm package).
Well, that didn’t go too well for me. It seems like it’s trying to overwrite the existing 3.6.12 Python installation, which is what I do NOT want. Any ideas?
r0b0ty@localhost:~> sudo zypper install python38
Loading repository data...
Reading installed packages...
Resolving package dependencies...
Problem: python38-3.8.10-lp152.49.1.x86_64 requires python(abi) = 3.8, but this requirement cannot be provided
not installable providers: python38-base-3.8.10-lp152.49.1.x86_64[https-download.opensuse.org-18a47cbb]
Solution 1: Following actions will be done:
install python38-base-3.8.10-lp152.49.1.x86_64 (with vendor change)
openSUSE --> obs://build.opensuse.org/devel:languages:python
deinstallation of python3-dbm-3.6.12-lp22.214.171.124.x86_64
deinstallation of python3-curses-3.6.12-lp126.96.36.199.x86_64
Solution 2: do not install python38-3.8.10-lp152.49.1.x86_64
Solution 3: break python38-3.8.10-lp152.49.1.x86_64 by ignoring some of its dependencies
Okay, that is not working out of the box, you are running in a problem with incompatible modules.
Only alternative then seems to install other Python versions from source.
Looks to me like also a good reason to try running a Virtual machine and have that run a different Python version but I do not have experience with that.
Do not be alarmed, it’s not commercial or closed source - they simply have an enterprise offering as well. We use it at my old job to manage multiple different python versions on SUSE boxes when we need it.
I love Anaconda, Miuku! And I use it regularly. Unfortunately for me, I was tasked to make this work without requiring Anaconda… so that’s my challenge. Honestly, doing this via Anaconda is my personal first choice. Thanks for your input, though!
I had a similar problem with multiple python3 versions on CentOS and i think we have solved it with pyenv. But i never used it with Leap so far. The pyenv version from the “Python Module … Leap_15.2” repository includes 3.8 support.