Pip 将包列为已过时但已满足要求的更新结果
Pip lists package as outdated but updating results in Requirement already satisfied
使用sudo pip install -U <package>
解决
所以当我 pip list --outdated
我得到:
Package Version Latest Type
----------------- ----------- ------ -----
anyio 3.3.3 3.3.4 wheel
cffi 1.14.6 1.15.0 wheel
contextlib2 0.6.0.post1 21.6.0 wheel
idna 3.2 3.3 wheel
ipywidgets 7.6.3 7.6.5 wheel
jsonschema 3.2.0 4.1.0 wheel
jupyter-client 6.1.12 7.0.6 wheel
keyring 23.0.1 23.2.1 wheel
matplotlib-inline 0.1.2 0.1.3 wheel
nbconvert 6.1.0 6.2.0 wheel
packaging 20.9 21.0 wheel
pandocfilters 1.4.3 1.5.0 wheel
pip 20.3.4 21.3 wheel
PyGObject 3.40.1 3.42.0 sdist
pyOpenSSL 20.0.1 21.0.0 wheel
pytz 2021.1 2021.3 wheel
pyzmq 22.2.1 22.3.0 wheel
resolvelib 0.5.5 0.8.1 wheel
setuptools 57.4.0 58.2.0 wheel
sip 4.19.25 6.3.1 wheel
terminado 0.11.1 0.12.1 wheel
trimesh 3.9.31 3.9.32 wheel
websocket-client 0.59.0 1.2.1 wheel
然后当我 pip install anyio -U
更新第一个包时,我得到:
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: anyio in ./.local/lib/python3.9/site-packages (3.3.4)
Requirement already satisfied: idna>=2.8 in ./.local/lib/python3.9/site-packages (from anyio) (3.3)
Requirement already satisfied: sniffio>=1.1 in /usr/lib/python3.9/site-packages (from anyio) (1.2.0)
据我所知,该软件包已经更新,但 pip 仍将该软件包列为已过时,也未将其列在更新的软件包列表中。
这是怎么回事?
请参阅 this,您可以猜到这里的问题是 Defaulting to user installation because normal site-packages is not writeable
,它涉及一些我不确定的权限相关问题。
你可以在这里使用 python3 -m pip install -U <package>
.
A stable solution could be to reinstall python from scratch in your system.
使用sudo pip install -U <package>
所以当我 pip list --outdated
我得到:
Package Version Latest Type
----------------- ----------- ------ -----
anyio 3.3.3 3.3.4 wheel
cffi 1.14.6 1.15.0 wheel
contextlib2 0.6.0.post1 21.6.0 wheel
idna 3.2 3.3 wheel
ipywidgets 7.6.3 7.6.5 wheel
jsonschema 3.2.0 4.1.0 wheel
jupyter-client 6.1.12 7.0.6 wheel
keyring 23.0.1 23.2.1 wheel
matplotlib-inline 0.1.2 0.1.3 wheel
nbconvert 6.1.0 6.2.0 wheel
packaging 20.9 21.0 wheel
pandocfilters 1.4.3 1.5.0 wheel
pip 20.3.4 21.3 wheel
PyGObject 3.40.1 3.42.0 sdist
pyOpenSSL 20.0.1 21.0.0 wheel
pytz 2021.1 2021.3 wheel
pyzmq 22.2.1 22.3.0 wheel
resolvelib 0.5.5 0.8.1 wheel
setuptools 57.4.0 58.2.0 wheel
sip 4.19.25 6.3.1 wheel
terminado 0.11.1 0.12.1 wheel
trimesh 3.9.31 3.9.32 wheel
websocket-client 0.59.0 1.2.1 wheel
然后当我 pip install anyio -U
更新第一个包时,我得到:
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: anyio in ./.local/lib/python3.9/site-packages (3.3.4)
Requirement already satisfied: idna>=2.8 in ./.local/lib/python3.9/site-packages (from anyio) (3.3)
Requirement already satisfied: sniffio>=1.1 in /usr/lib/python3.9/site-packages (from anyio) (1.2.0)
据我所知,该软件包已经更新,但 pip 仍将该软件包列为已过时,也未将其列在更新的软件包列表中。
这是怎么回事?
请参阅 this,您可以猜到这里的问题是 Defaulting to user installation because normal site-packages is not writeable
,它涉及一些我不确定的权限相关问题。
你可以在这里使用 python3 -m pip install -U <package>
.
A stable solution could be to reinstall python from scratch in your system.