Score:0

Installing python3.10 on Ubuntu23.04, alongside with python3.11 causes apt crash

mw flag

I need to use python3.10 on Ubuntu23.04.

I've tried to install python3.10 on Ubuntu23.04, alongside with python3.11. And, it looks like it has been installed.

But, python3.10-venv didn't.

Than I've tried to switch versions and try install python3.10-venv again, working under python3.10, and looks like they have been switched.

But, with python3.10 i have not-working package manager

(looks like python3.11 is used in 23.04 system components).

I've tried to sudo add-apt-repository ppa:deadsnakes/ppa, working under python3.11 (bc apt doesn't work with python3.10 in current situation), but soon i realised,

that deadsnakes doesn't support Ubuntu 23.04 for now.

So, is there any variants how to install fully working python3.10 alongside with python3.11 on Ubuntu23.04, with working package manager?

Raffa avatar
jp flag
Related: [Terminal and other apps suddenly won't open](https://askubuntu.com/q/1448702)
MIku avatar
mw flag
@Raffa, thanks for response. But i have no problem with working under `python3.11` for now. In case i switch the system wide python ver to 3.11 (even without loading live disk and rerooting system, like in this linked manual), i can absolutely normally work with apt and all stuff from `ubuntu 23.04`. Main problem is to use `python3.10`. I can use this version normally, but i can't install basic packages for it, like `venv`
Raffa avatar
jp flag
Prior to Python3.11, the venv package was named `python3-venv` ... You can as well do `pip3 install virtualenv` then `virtualenv env -p /bin/python3.10` ... Or even `/bin/python3.10 -m pip install virtualenv` and then `/bin/python3.10 -m virtualenv env`
MIku avatar
mw flag
@Raffa, thank you very much. Your last solution was very clear and elegant, imho. And it works pretty smooth! :) Thanks again. :)))
MIku avatar
mw flag
@Raffa, sorry about disturbing, but, all worked well, except PyCharm. It can't handle python3.10 somehow. When i'm trying to select venv in interpreter settings, it doesn't select it at all. Any thoughts? :)
Raffa avatar
jp flag
Do you select the python executable in that virtual environment's directory or do you select the activation script? as the latter will not work but the former should work ... See for example how to directly use a virtual environment without activating it https://askubuntu.com/a/1459030
MIku avatar
mw flag
@Raffa, i activate venv firstly (it actually creates). It works via operating with command line. But, Pycharm builtIn methods can't run selected copy of python. I select the necessary folder and python copy via PyCharm UI, but it doesn't apply to the project in PyCharm.
Raffa avatar
jp flag
Have you tried this https://www.jetbrains.com/help/pycharm/creating-virtual-environment.html ?
MIku avatar
mw flag
@Raffa, of course i did :). It doesn't work neither with manual creating nor with automatic (by pycharm, like in the link) PyCharm simply `drops` the selecting process and even doesn't show choose 3.10 interpreter in the existing interpreters list.
Raffa avatar
jp flag
I don't use PyCharm myself but I'm sure there are members of this community who do and probably can help with that ... So, maybe it's time you post that in a new question.
Score:0
mw flag

Using python3.11 as default and compiling python3.10 from source with adding the usr/local/bin to PATH and updating alternatives for python (with setting python3.11 as default) solved the problem for me.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.