I have a project that I deploy using pip
from Github, using pip install https://github.com/me/my_project/archive/main.tar.gz
. This works fine, but I don’t see a good way to upgrade the installation after I push.
Things that don’t work:
- Just running
pip install https://github...
agian. This appears to download the new archive, but doesn’t install anything. pip install -U https://github...
. Same effect.pip install --force-reinstall https://github...
. This works, but reinstalls everything, which is slow. I can add--no-deps
as in this answer, but then I can’t change my dependencies.pip install git+...
. The target system doesn’t have git.pip uninstall -y my_project; pip install https://github...
. This almost works, but it always reinstalls, even if there’s no change.
The documentation isn’t very clear, but it seems like the problem is that pip
only understands the version that’s declared in the package, and can’t otherwise tell if the package changed. Is that correct? This would be surprising to me, since it records the hash of the installed package according to PEP 610.