[英]pip install the latest version
I am new to python and django. 我是python和django的新手。 In my requirements\\common.txt I have the following line with version:
在我的要求\\ common.txt中,我有以下版本的版本:
django-simple-captcha==0.5.*
the problem is that when I run pip install -r requirements\\common.txt
, as I have version 0.5.3 of that package, it wouldn't update it to latest version (0.5.6), only pip --upgrade requirements\\common.txt
would upgrade to latest version. 问题是当我运行
pip install -r requirements\\common.txt
,因为我有该软件包的0.5.3版本,它不会将它更新到最新版本(0.5.6),只有pip --upgrade requirements\\common.txt
--upgrade pip --upgrade requirements\\common.txt
将升级到最新版本。 Is there anyway to modify common.txt
file so running pip install
installs the latest version? 反正有没有修改
common.txt
文件所以运行pip install
安装最新版本?
I am asking because this file is going to be used by a couple of developers and if they have for example version 0.5.3 of that package already, it would'nt upgrade it and there are lots of packages needing upgrade. 我问,因为这个文件将由几个开发人员使用,如果他们已经拥有该软件包的0.5.3版本,它将不会升级它,并且有很多软件包需要升级。
tnx TNX
-U or --upgrade will update listed packages -U或--upgrade将更新列出的包
Example: 例:
pip install django-simple-captcha -U
Just remove ==0.5.*
and the latest available version of django-simple-captcha
for your OS will be installed if available. 只需删除
==0.5.*
,如果可用,将安装适用于您的操作系统的最新版本的django-simple-captcha
。
To view the current installed version use: 要查看当前安装的版本,请使用:
pip show django-simple-captcha
what if I want the latest minor version?
如果我想要最新的次要版本怎么办?
You can try: 你可以试试:
pip install "package>=0.2,<0.3"
Here's a pip
Cheatsheet 这里有一个
pip
的cheatsheet
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.