5

I'm trying to pip install a specific fork of a repo, which is located here: https://github.com/grutz/flask-session/tree/ed62129fa1d9af36e77e9ce1de571d2c873a6c4e

Per this SO question, I've tried the following but no luck:

# pip install <link>
pip install https://github.com/grutz/flask-session/tree/ed62129fa1d9af36e77e9ce1de571d2c873a6c4e

# pip install git+<link>
pip install git+https://github.com/grutz/flask-session/tree/ed62129fa1d9af36e77e9ce1de571d2c873a6c4e

# pip install git+https://github.com/user/repo@branch
pip install git+https://github.com/grutz/flask-session@ed62129fa1d9af36e77e9ce1de571d2c873a6c4e

# pip install git+https://github.com/user/repo.git@branch
pip install git+https://github.com/grutz/flask-session.git@ed62129fa1d9af36e77e9ce1de571d2c873a6c4e

What am I doing wrong here? I can post my stack trace but I figured I'm missing something simple here and that would just add clutter.

Johnny Metz
  • 3,186
  • 6
  • 40
  • 97

1 Answers1

3

pip needs to know the name of the project; name it using egg= URL hash param:

pip install git+https://github.com/grutz/flask-session.git@ed62129fa1d9af36e77e9ce1de571d2c873a6c4e#egg=flask-session
phd
  • 57,284
  • 10
  • 68
  • 103
  • I'm getting the following error using this: `Could not find a tag or branch 'ed62129fa1d9af36e77e9ce1de571d2c873a6c4e', assuming commit. Permission denied (publickey). fatal: Could not read from remote repository.` Did it work for you? – Johnny Metz Aug 08 '17 at 14:11
  • Stack trace goes on to say: `Please make sure you have the correct access rights and the repository exists. fatal: clone of 'git@github.com:mitsuhiko/flask-sphinx-themes.git' into submodule path '/Users/Jonnymetz/github/src/flask-session/docs/_themes' failed Failed to clone 'docs/_themes'.` Perhaps this is what's causing the error. – Johnny Metz Aug 08 '17 at 14:31
  • `Could not find a tag or branch 'ed62129fa1d9af36e77e9ce1de571d2c873a6c4e', assuming commit.` is not an error — just a warning; I also saw it. Repository `git@github.com:mitsuhiko/flask-sphinx-themes.git` is public and doesn't require any access right; I cloned it successfully; can you clone it manually?. Command `pip install` above also works for me. – phd Aug 08 '17 at 17:14
  • So you're saying I need to `pip install` or `git clone` that "flask-sphinx-themes" repo before trying to pip install the fork? If so, will `pip install Flask-Sphinx-Themes` achieve this? – Johnny Metz Aug 08 '17 at 18:30
  • I hope it helps. – phd Aug 08 '17 at 19:27
  • I did a `pip install Flask-Sphinx-Themes` but I'm still getting the same error unfortunately :( – Johnny Metz Aug 09 '17 at 04:57
  • It appears this extension is no longer maintained. Otherwise this command should have worked! – Johnny Metz Aug 11 '17 at 00:52