" pip3列表 - 已过时"项目是保持在" pip3安装-U"

时间:2018-02-21 09:11:32

标签: python python-3.x pip rst2pdf

我正在使用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]
$ 

2 个答案:

答案 0 :(得分:1)

https://pypi.python.org/pypi/rst2pdf没有可下载的软件包 - 无需更新。您可以尝试从https://github.com/rst2pdf/rst2pdf

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

答案 1 :(得分:0)

一个新的答案:rst2pdf是为Python3打包的,因此pip应该可以为您管理它。

相关问题