Python updates conflicting with applicatiions

I might be using this website wrong because i cant find the post section. But ive been stuck on this problem since Ive uploaded.

I have kali as my main os on this computer for home server auditing, and i am attempting to use some windows only software on qemu/kvm. I recently updated my system against my better judgment and now the application (virt-manager) kvm wont launch due to an error in python.

The specific error is the ModuleNotFoundError for the module gi. Which i assunmed was updated in the newest kali update, causing previously perfectly running python files to just brick and stop running.

This would just be a standard python problem if my computer out of date, but it turns out thats not the case.

If You look at the top, i first attempted to open the gui, but i get this error.
So i then attempt to install it, thinking it wasen’t installed or deleted and python says its installed and up to date.

If anyone could point me toward the kali update that changed my pythons ability to use this module, please let me know

image

That’s a dead-giveaway that you didn’t update the way that Kali documentation tells us to.

My suggestion would be to follow the documentation, do a full-upgrade, and most likely your problem will be solved en passant - if not, we can look at specifics then, but troubleshooting should always be done after making sure your system is current and up to date.

Okay, so i followed your advice and updated according to the kali documentation. And now its telling me the module simply isn’t available. I initially assumed that it had something to do with the update but now im sure. Take a look

I appreciate the help.

1 Like

How did you install virt-manager in the first place? Cause I can’t reproduce your error at all with a fully up to date kali installation.

Did you follow some guide that made you install it from somewhere else than the virt-manager that is in the kali repositories?

Hello, so one time shift restore later and my qml and thus desktop environment was completely bricked by my full upgrade of my system. I am really unsure of what exactly is causing the problem.

To answer your question, i simply wrote the command to unstall both qemu and virt-manger. And given the installation was successful i assumed it pulled directly from the kali repository to install it.

1 Like

I have no idea if you ever will read this. But i suppose ill atempt one more time.

I undertsand the problem fully know, i just have no clue how to fix it and i doubt anyone does either.

The root problem is that my python and apt and “connected” so to speak, or at least well enough to pull the python packages needed for virt-manager to run correctly.

I think it has something to do with when i first installed kali linux, i believe i built python from a file without knowing it was included via apt. When the system updated (or when i updated it manually) it caused something regarding the way python pulls apt packages to update too. And thus bricking it entirely as now apt-installed python modules are not accessible via virt-manager.

What id like to know is how to undo/fix that by having virt-manager pull from the apt-python3 directory again. (Or i wont… not expecting much from this)

That is your problem right there and honestly, it’s going to be quicker to just do a reinstall. Python is a key component of Kali and most Linux distributions. When you installed this other python, it most likely over wrote the systems python, then you did an update, so when installing the updates, apt over wrote your custom python or (some of your custom python install).

This is one big mess and would take a long time for someone knowledgeable to fix. A reinstall will be much quicker, and better in the long run.

1 Like

A reinstall of python or my apt library. (im not quite sure how to do either of those)

I meant a reinstall of Kali.

1 Like

Well, im not doing that… tell you what.. thx for the help yall have attempted to give me so far. I most likely fix this manually on my own time.

Good luck with that.

Well I wish you the best of luck.

But if you don’t know to do either of those relatively simple tasks, I wouldn’t have a whole lot of hope for solving this overall problem manually.

The installation process for Kali has been designed to be super simple and quick. Why? Because it’s something that will be needed to be done regularly.

A reinstall should take about 20 minutes at most. I think your time would be better spent doing that and then continuing your learning with the system.

Hello guys, need help here with my python
I have installed python 3.12.7 but I could not open it using my console

How did you install it?

I installed it using the console
first I updated my kali and then upgraded it
after that I did ‘sudo apt install python’ it was successful
now I am trying to open it but won’t open up
is there any alternative way to open python using the gui?

so typing python3 doesn’t open python version 3 for you?

So in the terminal you have:

(Braven@kali)-[~]:

And you type in:

python

What happens then?

It already did I already saw the three >>>
which means I can now do my script right?

I am now in python..
Thanks @denartha

1 Like

I was trying to run my script but it says syntax error even the simplest script what could be wrong?