升级到 Debian 12 后如何删除旧的 pip 软件包?

升级到 Debian 12 后如何删除旧的 pip 软件包?

在 Debian 12 之后,我的系统范围内的 pip 软件包崩溃了。我想删除它们,pipx而是使用它们。但是,我无法列出/删除那些以前安装的软件包。

我假设这些文件是在/usr/local/bindebain 11 之前安装的:

# ls -al /usr/local/bin
total 60
drwxr-xr-x  2 root root 4096 Jan 30 13:41 .
drwxr-xr-x 10 root root 4096 Dec  4  2019 ..
-rwxr-xr-x  1 root root  233 Mar 30  2023 google-oauthlib-tool
-rwxr-xr-x  1 root root  216 Aug  7 09:35 gphotos-sync
-rwxr-xr-x  1 root root  221 Aug  7 09:34 pip
-rwxr-xr-x  1 root root  221 Aug  7 09:34 pip3
-rwxr-xr-x  1 root root  221 Aug  7 09:34 pip3.11
-rwxr-xr-x  1 root root  221 May 21  2021 pip3.7
-rwxr-xr-x  1 root root  221 Aug  7 09:34 pip3.9
-rwxr-xr-x  1 root root  212 Sep 14  2022 pyrsa-decrypt
-rwxr-xr-x  1 root root  212 Sep 14  2022 pyrsa-encrypt
-rwxr-xr-x  1 root root  210 Sep 14  2022 pyrsa-keygen
-rwxr-xr-x  1 root root  233 Sep 14  2022 pyrsa-priv2pub
-rwxr-xr-x  1 root root  206 Sep 14  2022 pyrsa-sign
-rwxr-xr-x  1 root root  210 Sep 14  2022 pyrsa-verify

这些是 pip3 列出的软件包:

# pip3 list
Package            Version
------------------ ------------
argcomplete        2.0.0
attrs              22.2.0
Babel              2.10.3
ceph               1.0.0
cephfs             2.0.0
certifi            2022.9.24
chardet            5.1.0
charset-normalizer 3.0.1
click              8.1.3
colorama           0.4.6
crit               3.17.1
cryptography       38.0.4
ghp-import         2.1.0
httplib2           0.20.4
idna               3.3
iniconfig          1.1.1
Jinja2             3.1.2
joblib             1.2.0
livereload         2.6.3
lunr               0.6.2
Markdown           3.4.1
MarkupSafe         2.1.2
mergedeep          1.3.4
mkdocs             1.4.2
more-itertools     8.10.0
nltk               3.8
numpy              1.24.2
packaging          23.0
pip                23.0.1
pipx               1.1.0
pluggy             1.0.0+repack
prettytable        3.6.0
protobuf           4.21.12
psutil             5.9.4
py                 1.11.0
pycurl             7.45.2
Pygments           2.14.0
PyGObject          3.42.2
pyinotify          0.9.6
PyJWT              2.6.0
pyparsing          3.0.9
PySimpleSOAP       1.16.2
pytest             7.2.1
python-apt         2.6.0
python-dateutil    2.8.2
python-debian      0.1.49
python-debianbts   4.0.1
pytz               2022.7.1
PyYAML             6.0
pyyaml_env_tag     0.1
rados              2.0.0
rbd                2.0.0
regex              2022.10.31
reportbug          12.0.0
requests           2.28.1
setuptools         66.1.1
simplejson         3.18.3
six                1.16.0
systemd-python     235
tornado            6.2
tqdm               4.64.1
urllib3            1.26.12
userpath           1.8.0
watchdog           2.2.1
wcwidth            0.2.5
wheel              0.38.4

我找不到任何以前安装的软件包,也无法卸载其中任何一个。例如我想删除gphotos-sync给我这个:

# pip3 uninstall gphotos-sync --break-system-packages
WARNING: Skipping gphotos-sync as it is not installed.

但我的系统仍然将这些包链接到/usr/local/bin.

我该如何处理这些软件包才能安全卸载它们?

相关内容