Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

pip: pulling updates from remote git repository

I installed scikit-learn from GitHub a couple of weeks ago:

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.

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

I tried pip install scikit-learn --upgrade but I got:

Requirement already up-to-date Cleaning up ... 
like image 634
Amelio Vazquez-Reina Avatar asked Jul 17 '13 21:07

Amelio Vazquez-Reina


People also ask

Can pip install from Github?

You can deploy Git locally, or use it via a hosted service, such as Github, Gitlab or Bitbucket. One of the advantages of using pip together with Git is to install the latest commits of unreleased Python packages as branches from Github.

Can pip update packages?

Pip can be used to upgrade all packages on either Windows or Linux: Output a list of installed packages into a requirements file (requirements.


2 Answers

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

You'll have to reinstall from Git:

$ pip install git+git://github.com/scikit-learn/scikit-learn@main 
like image 193
Blender Avatar answered Sep 24 '22 05:09

Blender


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

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

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@main 
like image 45
Alexis Métaireau Avatar answered Sep 22 '22 05:09

Alexis Métaireau