gpt4 book ai didi

python - "pip3 list --outdated"项目在 "pip3 install -U"之后保留剩余

转载 作者:太空宇宙 更新时间:2023-11-03 14:05:55 24 4
gpt4 key购买 nike

我正在使用 pip3 list --outdated --format=freeze 批量更新当前安装的所有软件包。最近我注意到一个包 rst2pdfpip3 install -U 之后保留下来。
我在使用 MacOS High Sierra 和 Ubuntu 16.04 时遇到了这个问题。

从python编程的角度来看,这并不重要,因为我可以使用它。但从系统管理员的角度来看,所有的包都在下载,浪费时间和带宽。

有什么方法可以从 pip3 list --outdated 输出中删除已完成的项目吗?

这是命令输出:

bash-3.2$ pip3 install -U rst2pdf
Collecting rst2pdf
Requirement already up-to-date: reportlab>=2.4 in /usr/local/lib/python3.6/site-packages (from rst2pdf)
Requirement already up-to-date: pdfrw in /usr/local/lib/python3.6/site-packages (from rst2pdf)
Requirement already up-to-date: setuptools in /usr/local/lib/python3.6/site-packages (from rst2pdf)
Requirement already up-to-date: Pygments in /usr/local/lib/python3.6/site-packages (from rst2pdf)
Requirement already up-to-date: docutils in /usr/local/lib/python3.6/site-packages (from rst2pdf)
Requirement already up-to-date: pillow>=2.4.0 in /usr/local/lib/python3.6/site-packages (from reportlab>=2.4->rst2pdf)
Requirement already up-to-date: pip>=1.4.1 in /usr/local/lib/python3.6/site-packages (from reportlab>=2.4->rst2pdf)
Installing collected packages: rst2pdf
Found existing installation: rst2pdf 0.93.dev0
Uninstalling rst2pdf-0.93.dev0:
Successfully uninstalled rst2pdf-0.93.dev0
Successfully installed rst2pdf-0.93.dev0
bash-3.2$ echo $?
0
bash-3.2$ pip3 list --outdated
DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning.
rst2pdf (0.93.dev0) - Latest: 0.93 [sdist]

更新:2018/02/22当我卸载 rst2pdf 并重新安装它时,我得到相同的结果。这是 bash 日志:

$ sudo pip3 uninstall rst2pdf
Uninstalling rst2pdf-0.93.dev0:
/usr/local/bin/rst2pdf
/usr/local/lib/python3.5/dist-packages/rst2pdf-0.93.dev0-py3.5.egg-info
......(snip)....
/usr/local/lib/python3.5/dist-packages/rst2pdf/writer.py
Proceed (y/n)? y
Successfully uninstalled rst2pdf-0.93.dev0
$
$ sudo pip3 install rst2pdf
Downloading rst2pdf-0.93.tar.gz (1.3MB)
100% |████████████████████████████████| 1.3MB 706kB/s
Requirement already satisfied: setuptools in /usr/local/lib/python3.5/dist-packages (from rst2pdf)
Requirement already satisfied: docutils in /usr/local/lib/python3.5/dist-packages (from rst2pdf)
Requirement already satisfied: reportlab>=2.4 in /usr/local/lib/python3.5/dist-packages (from rst2pdf)
Requirement already satisfied: Pygments in /usr/local/lib/python3.5/dist-packages (from rst2pdf)
Requirement already satisfied: pdfrw in /usr/local/lib/python3.5/dist-packages (from rst2pdf)
Requirement already satisfied: pip>=1.4.1 in /usr/local/lib/python3.5/dist-packages (from reportlab>=2.4->rst2pdf)
Requirement already satisfied: pillow>=2.4.0 in /usr/local/lib/python3.5/dist-packages (from reportlab>=2.4->rst2pdf)
Installing collected packages: rst2pdf
Running setup.py install for rst2pdf ... done
Successfully installed rst2pdf-0.93.dev0
$
$ pip3 list --outdated
DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning.
rst2pdf (0.93.dev0) - Latest: 0.93 [sdist]
$

最佳答案

https://pypi.python.org/pypi/rst2pdf 没有可下载的软件包— 没有什么可更新的。您可以尝试从https://github.com/rst2pdf/rst2pdf升级

pip install --upgrade git+https://github.com/rst2pdf/rst2pdf.git#egg=rst2pdf

关于python - "pip3 list --outdated"项目在 "pip3 install -U"之后保留剩余,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48901950/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com