简体   繁体   中英

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.

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 .

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM