'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 ...


Solution 1:[1]

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

Solution 2:[2]

What worked for me was to use --force-reinstall:

pip install --force-reinstall --no-deps git+git://github.com/scikit-learn/scikit-learn@main

--no-deps to avoid reinstalling all the dependencies

Solution 3:[3]

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.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 adrin
Solution 2 Smart Manoj
Solution 3 Games Brainiac