Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install Python 3.8 along with Python 3.9 in Arch Linux?

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.

like image 308
izkeros Avatar asked Dec 10 '20 08:12

izkeros


People also ask

How do I install Python in Archlinux?

Package management There are several ways to install Python packages on Arch Linux: Official repositories and AUR — A large number of popular packages are available in the Arch repositories. This is the preferred way to install system-wide packages. pip(1) — The official package installer for Python.

How install python3 8 on Arch Linux?

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.


2 Answers

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.

like image 151
Ahacad Avatar answered Sep 20 '22 06:09

Ahacad


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.

like image 39
Code-Apprentice Avatar answered Sep 24 '22 06:09

Code-Apprentice