pipx icon indicating copy to clipboard operation
pipx copied to clipboard

pipx package upgrade broke after python upgrade on Kali

Open riramar opened this issue 7 months ago • 0 comments

Describe the bug

After upgrading python from 3.12 to 3.13 on Kali I got the error below trying to upgrade the waymore package.

ricardo@zion:~$ pipx upgrade waymore
Traceback (most recent call last):
...
  File "/usr/lib/python3.13/subprocess.py", line 1974, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/home/ricardo/.local/share/pipx/venvs/waymore/bin/python'

Checking the directory of the package, we can see the problem is the symlinks are pointing to the old python version that doesn't exist anymore.

ricardo@zion:~$ ls -l /home/ricardo/.local/share/pipx/venvs/waymore/bin/
...
lrwxrwxrwx 1 ricardo ricardo   10 Nov 12 10:00 python -> python3.12
lrwxrwxrwx 1 ricardo ricardo   10 Nov 12 10:00 python3 -> python3.12
lrwxrwxrwx 1 ricardo ricardo   19 Nov 12 10:00 python3.12 -> /usr/bin/python3.12
lrwxrwxrwx 1 ricardo ricardo   19 Mar  5 11:45 python3.13 -> /usr/bin/python3.13*

So I fixed them manually.

ricardo@zion:~$ ls -l /home/ricardo/.local/share/pipx/venvs/waymore/bin/
...
lrwxrwxrwx 1 ricardo ricardo   19 Mar  5 11:47 python -> /usr/bin/python3.13*
lrwxrwxrwx 1 ricardo ricardo   19 Mar  5 11:47 python3 -> /usr/bin/python3.13*
lrwxrwxrwx 1 ricardo ricardo   19 Mar  5 11:45 python3.13 -> /usr/bin/python3.13*

After that I got the new error below.

ricardo@zion:~$ pipx upgrade waymore
/home/ricardo/.local/share/pipx/venvs/waymore/bin/python: No module named pip
'/home/ricardo/.local/share/pipx/venvs/waymore/bin/python -m pip --no-input install --upgrade git+https://github.com/xnl-h4ck3r/waymore.git -q' failed

So I also fixed that manually and after that I was able to upgrade the waymore package.

ricardo@zion:~$ /home/ricardo/.local/share/pipx/venvs/waymore/bin/python -m ensurepip --upgrade
Looking in links: /tmp/tmpieqypmdw
Processing /tmp/tmpieqypmdw/pip-25.0-py3-none-any.whl
Installing collected packages: pip
Successfully installed pip-25.0
ricardo@zion:~$ pipx upgrade waymore
upgraded package waymore from 4.9 to 5.0 (location: /home/ricardo/.local/share/pipx/venvs/waymore)

How to reproduce

Check the Describe the bug section.

Expected behavior

Able to upgrade packages after python upgrade on Kali.

riramar avatar Mar 05 '25 15:03 riramar