How to install Python 3.8 along with Python 3.9 in Arch Linux?
Solution 1
Go for package python38
in AUR, if you have an AUR helper like yay just use yay -S python38
. Otherwise, just download the PKGBUILD and install manually with makepkg
.
You can also update python with pacman -Syu
(which is now python3.9). Then the two shall live together, inside /usr/bin/python3.x
.
Use virtual environment to manage them if you like, virtualenv --python=/usr/bin/python3.x yourenvname
.
Solution 2
Downgrading Python version for the whole system for that single reason do not looks like good idea for me.
This is a good observation. You should not modify the system installation of python. After you install the AUR package that Ahacad mentions. I suggest using virtualenv
or the standard venv
package to create a virtual environment for your tensorflow projects.
izkeros
Updated on June 17, 2022Comments
-
izkeros almost 2 years
I'm working with tensorflow. Recently Arch replaced Python 3.8 with 3.9 and at the moment there is no tensorflow build for Python 3.9. Downgrading Python version for the whole system for that single reason do not looks like good idea for me. My goal is to create virtual environment with python 3.8. Is there a way to have both (3.8 and 3.9) versions available in the system? Python page of arch wiki doesn't mention that.
EDIT:
I know, I can use:
virtualenv -p python3.8 py38
but I need an interpreter in the system. -
willwillis over 3 yearsI may be in the same situation as OP. I build venv's , did a system upgrade on Dec 13th now none of my venv's are working properly. I have the following pyvenv.cfg
home = /usr/bin
include-system-site-packages = false
version = 3.8.2
will I need to update this after installingpython38
via AUR? -
Code-Apprentice over 2 years@willwillis You will need to install a global Python 3.8. Your venvs should use it correctly once you do, possibly with some small tweaks. Fortunately, venvs are really easy to rebuild if you need to nuke them entirely. If you still need help, feel free to post a new question.