6

In man pip it says under --editable <path/url>,

Install a project in editable mode (i.e. setuptools "develop mode") from a local project path or a VCS url

What does that mean? Can I give it a repo branch on Github, and it'll go get it and install it and keep it updated as the branch changes?

Hatshepsut
  • 5,962
  • 8
  • 44
  • 80

1 Answers1

6

If you just want to install package from git repo read

-e or --editable is little bit different, it is used, as stated in docs, for setuptools's development mode. It makes installed packages editable.

Yes you can give it link to github. Read this answer for more info. But this link will only work if this repository contains setup.py with all installation instructions. And this package will be updated when you call

pip install -U -e <url>

But only if version of package in setup.py is higher than the one in your environment.

You can forcefully reinstall this package if you need to, when source did change but version didn't.

pip install -I -e <url>
Community
  • 1
  • 1
Sardorbek Imomaliev
  • 14,861
  • 2
  • 51
  • 63
  • Not sure, but it seems now `pip install -U ...` will upgrade the installation to the newest commit even if the version hasn't changed. The version shown has a bit of the commit SHA appended to it. – Anakhand Dec 14 '20 at 10:25
  • Agree pip install -U will update the package with latest commit – Drake Jun 02 '21 at 02:10