1

我正在使用pip3 list --outdated --format=freeze批量更新当前安装的所有软件包。最近我注意到一个包裹rst2pdf是在pip3 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]
$ 
4

2 回答 2

1

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

pip install --upgrade git+https://github.com/rst2pdf/rst2pdf.git#egg=rst2pdf
于 2018-02-21T14:28:14.300 回答
0

给你一个更新的答案:rst2pdf 是为 Python3 打包的,所以 pip 应该能够很好地为你管理它。

于 2020-08-24T09:48:17.177 回答