简体   繁体   English

pip如何知道软件包的最新版本?

[英]How can pip know a package's last version?

I use pip to manage my packages, but how can I know a package's newest version? 我使用pip来管理我的包裹,但是如何知道包裹的最新版本?

I use the 我用

pip install --upgrade eventlet  

find the result the version did not change. 查找结果,版本未更改。 still is eventlet (0.21.0) . 仍然是eventlet (0.21.0)

But in the GitHub , you see the doc the newest version is v0.22.1 . 但是在GitHub中 ,您看到的文档的最新版本是v0.22.1

If a package is not updated on pypi, you cannot pip install packagename to get the latest version. 如果软件包没有在pypi上更新,则无法通过pip install packagename获得最新版本。 If you absolutely want the latest version you can install it directly from git 如果您绝对想要最新版本,则可以直接从git安装

git clone <git URL of library>

cd into the directory and install the package: cd进入目录并安装软件包:

sudo python setup.py install

if you want to get the list of all the modules that can be updated ie the modules with updated available you can use: 如果要获取所有可以更新的模块的列表,即具有可用更新的模块,则可以使用:

pip list --outdated

This will give you the output like 这会给你输出像

.... ipython (6.2.1) - Latest: 6.3.1 [wheel] ....

allowing you to chose the packages you want to update 允许您选择要更新的软件包

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM