pip下载+为什么pip下载不到最新版本

pip download + why pip not download the latest version

我们要下载最新版本的 cffi pkg

我们做以下事情

pip download  cffi
Collecting cffi
  Using cached https://files.pythonhosted.org/packages/08/29/8001b940ef40e7a25ffe8f3188bc9b118934b513d64f769dbf461e46f4ed/cffi-1.14.0-cp27-cp27mu-manylinux1_x86_64.whl
  Saved ./cffi-1.14.0-cp27-cp27mu-manylinux1_x86_64.whl
Collecting pycparser (from cffi)
  Using cached https://files.pythonhosted.org/packages/ae/e7/d9c3a176ca4b02024debf82342dab36efadfc5776f9c8db077e8f6e71821/pycparser-2.20-py2.py3-none-any.whl
  Saved ./pycparser-2.20-py2.py3-none-any.whl
Successfully downloaded cffi pycparser

但我们得到 - 版本 - cffi-1.14.0 ,而不是最新版本 v1.8.3 ( https://cffi.readthedocs.io/en/release-1.8/whatsnew.html#v1-8-3 )

ls -ltr
total 492
-rw-r--r-- 1 root root 387834 Jun  4 08:04 cffi-1.14.0-cp27-cp27mu-manylinux1_x86_64.whl
-rw-r--r-- 1 root root 112041 Jun  4 08:04 pycparser-2.20-py2.py3-none-any.whl

所以有没有可能通过 pip 下载最新版本的 - cffi?

来自 - https://cffi.readthedocs.io/en/release-1.8/whatsnew.html#v1-8-3

What’s New
v1.8.3
When passing a void * argument to a function with a different pointer type, or vice-versa, the cast occurs automatically, like in C. The same occurs for initialization with ffi.new() and a few other places. However, I thought that char * had the same property—but I was mistaken. In C you get the usual warning if you try to give a char * to a char ** argument, for example. Sorry about the confusion. This has been fixed in CFFI by giving for now a warning, too. It will turn into an error in a future version.

1.14.0(首次发布于 2020-02-07)是比 1.8.3(首次发布于 2016-09-17)更新的版本。


如果你确实想要 1.8.3 版本,那么你可以指示 pip 这样做:

path/to/pythonX.Y -m pip install 'cffi==1.8.3'

正如 sinoroc 指出的那样,14 比 8 更新。不过我可能会补充说,您也在

查看过时的文档
https://cffi.readthedocs.io/en/**release-1.8**/whatsnew.html

请注意,如果您在

查看当前文档,它是专门针对 1.8 版的
https://cffi.readthedocs.io/en/latest/whatsnew.html

您还会看到 1.14 是最新版本