pip:从远程 git 存储库中提取更新

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/17710947/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 08:47:27  来源:igfitidea点击:

pip: pulling updates from remote git repository

pythongitgithubpipscikit-learn

提问by Amelio Vazquez-Reina

I installed scikit-learnfrom GitHub a couple of weeks ago:

几周前我从 GitHub安装了scikit-learn

pip install git+git://github.com/scikit-learn/scikit-learn@master

I went to GitHub and there have been several changes to the master branch since then.

我去了 GitHub,从那时起,master 分支发生了一些变化。

How can I update my local installation of scikit-learn?

如何更新我的本地安装scikit-learn

I tried pip install scikit-learn --upgradebut I got:

我试过了,pip install scikit-learn --upgrade但我得到了:

Requirement already up-to-date
Cleaning up ...

采纳答案by Blender

pipsearches for the library in the Python package index. Your version is newer than the newest one in there, so pip won't update it.

pip在 Python 包索引中搜索库。您的版本比那里的最新版本新,因此 pip 不会更新它。

You'll have to reinstall from Git:

您必须从 Git 重新安装:

$ pip install git+git://github.com/scikit-learn/scikit-learn@master

回答by Alexis Métaireau

You need to install the version from github, or locally.

您需要从 github 或本地安装该版本。

The way I usually do is that I git clone the repository locally and I run python setup.py installor python setup.py developon it so I'm sure about the version being used.

我通常做的方法是在本地 git clone 存储库,然后在其上运行python setup.py install或运行python setup.py develop,这样我就可以确定正在使用的版本。

Re-issuing the command you've done the first time with the upgrade flag would do the trick otherwise.:

重新发出您第一次使用升级标志执行的命令,否则就可以解决问题。:

pip install --upgrade git+git://github.com/scikit-learn/scikit-learn@master

回答by Games Brainiac

IIRC, Pip installs based on pypi. If you want to upgrade to the version that is currently hosted on github, then you are going to have to use the url from github.

IIRC,Pip基于pypi安装。如果要升级到当前托管在 github 上的版本,则必须使用来自 github 的 url。