Score:0

'Software & Updates' app is not opening

is flag

I wanted to install ROS on my PC and for that, I needed to make sure download from 'restricted', 'universe' and 'multiverse' repositories are allowed. For this, I need to change settings on 'Software & Update' app, but everytime I click on it, nothing happens. The same happens with the 'Software Updater' app. I tried multiple solutions recommended online to fix this like reinstalling update-manager, running sudo apt update, etc. But nothing worked.

I also tried using the command line to allow download from these repositories using this command: sudo add-apt-repository universe. But I got the following error:

File "/usr/bin/add-apt-repository", line 12, in <module>
    from softwareproperties.SoftwareProperties import SoftwareProperties, shortcut_handler
  File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 68, in <module>
    from gi.repository import Gio
  File "/usr/lib/python3/dist-packages/gi/__init__.py", line 42, in <module>
    from . import _gi
ImportError: cannot import name '_gi' from partially initialized module 'gi' (most likely due to a circular import) (/usr/lib/python3/dist-packages/gi/__init__.py)

Again, I tried installing gi repository and running the command but again, it did not work. I think this will be solved once I fix the 'Software & Updates' app. I am fairly new to linux. Please guide me with how I can solve this. Thanks a ton!

Edit: My OS is Ubuntu 20.04.5 LTS 64-bit. When I installed I think the default python version was 3.7 (not sure, where do I check this?). But now, python --version shows 3.10.4. COuld this cause the problem? How do I correct this?

guiverc avatar
cn flag
Providing your OS & release (release is esp. important where *deb* packages are involved) are essential. Have you changed your default python3 version? as that also can prevent user-package tools from working (*they rely on python3 & the version the system comes with*).
Aravindh P avatar
is flag
My OS is Ubuntu 20.04.5 LTS 64-bit. Yes, when I installed I think the default python version was 3.7 (not sure, where do I check this?). But now, python --version shows 3.10.4. How do I correct this?
guiverc avatar
cn flag
You haven't specified if you're talking about Ubuntu Desktop 20.04 or Ubuntu Server 20.04 (not what architecture as there are multiple 64-bit architectures), but if you change the default python3 then problems will exist until you return python3 back to default. The python3 errors you show are because you changed the version; reverse your change(s). *You may find many high-end (ie. easier) user level tools no longer work, but basic package tools will still run at text terminal... many GUI tools may not work until python3 default is restored*
Aravindh P avatar
is flag
Its Ubuntu Desktop 20.04. Yes, even I had the feeling that it could be because of python versions because I keep getting multiple errors while trying to install stuff. Could you please guide me on how to find what my default version should be, how do I remove the other duplicate versions and how do I restore the default? Or could you direct me to a resource with instructions? Thank you!
guiverc avatar
cn flag
You reverse whatever you did, as I don't know how you replaced the *default* python3 version (*and there are many ways of doing it*), I can't tell you the correct way to reverse what you did as I don't know which method you used. You can always *re-install* to correct the issue (*it's usually easiest*), and you can re-install Ubuntu Desktop releases non-destructively (ie. not touch any user file/config, and have *manually installed* packages [from Ubuntu repositories] re-install automatically, though if you use server apps they may lose configs as its intended for desktop systems only..)
Aravindh P avatar
is flag
I'm sorry but I am not very clear on what you said. What do you mean by reinstalling Ubuntu Desktop releases non-destructively? I changed default using a series of commands like: update-alternatives --install /usr/bin/python python /usr/bin/python3.10 2. I am surprised to find that I have no python3.7 in my system now.
Aravindh P avatar
is flag
So would you recommend installing python3.7 (assuming that is the default version of my system) and uninstalling all other versions? Firstly, how do I find what is the default version of my system?
Aravindh P avatar
is flag
I found a resource with instructions on resetting python defaults: https://www.rosehosting.com/blog/how-to-install-and-switch-python-versions-on-ubuntu-20-04/ I would be very grateful if you could have a look at it and tell me if this is how it should be done. Thanks!
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.