I'm not sure what has happened to my Ubuntu server. I just migrated from an old Ununtu 20.04 to 24.04, and most things seem to now by working all right.
However, if I run pip
I get:
svend@localhost:~$ pip-bash: /home/svend/.local/bin/pip: cannot execute: required file not found
If I run python -m pip
it works all right:
svend@localhost:~$ python -m pip --versionpip 24.0 from /usr/lib/python3/dist-packages/pip (python 3.12)
I think the files in .local are actually from my old server, when I migrated everything in my home directory, and it might be the wrong version:
svend@localhost:~$ cat .local/bin/pip#!/usr/bin/python3.10# -*- coding: utf-8 -*-import reimport sysfrom pip._internal.cli.main import mainif __name__ == '__main__': sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) sys.exit(main())
It seems that if I change the #!
in the top of the script to #!/usr/bin/python3.12
, it works again, but... that seems a bit hacky? Is there a better way of having these regenerated? I've tried: sudo apt install --reinstall python3-pip
, but that didn't seem to do it.