Python is not working while checking version

root@ben:~# python --version
command_not_found_handler:2: /usr/lib/command-not-found: bad interpreter: /usr/bin/python3: no such file or directory

It seems that the packaging of python3 has an issue.
You are likely to need to get help from your distro’s support people.
Is that Kali?

And what do the commands show

$ command -v python
$ command -v python3


it shows like this

Then look at what it gives out

$ /usr/local/bin/python3 --version
$ /usr/local/bin/python3.13 --version
$ python3 --version

That’s how it works :slight_smile:

could you help me bro plz, i tried all solutions but some worked,again it stuck’s bro could you plz help me to resolve

This already applies to package management issues in the operating system. And you will have to deal with system administration issues separately.
And here is a python-specific community :wink:

oh i see tq bro

A python in /usr/local suggests that it was a local build of python and not installed by apt. I expect apt packages to put python in /usr.

But I am not a Kali user so you must ask them for help.

It seems to me that portable python builds without any system bindings should generally be considered the best approach.
And in the case above, python is quite accessible via python3 command. I don’t see any problems at all.

No. Distro built and maintain is best as it fixes security bugs and exploits distro strengths to the full.

Or exploits distro weaks :wink:
Portable environments that are independent of the operating system also have many advantages in terms of security.

My experience is that this is not the case.
We will just have to disagree.

I’m not suggesting it :slight_smile:
The point is that your variant is not the only possible one, and then let everyone choose and decide for themselves.