Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error installing GitPython==2.1.14 #61

Open
Rayman opened this issue Feb 24, 2020 · 6 comments
Open

Error installing GitPython==2.1.14 #61

Rayman opened this issue Feb 24, 2020 · 6 comments

Comments

@Rayman
Copy link

Rayman commented Feb 24, 2020

I can't install GitPython==2.1.14 anymore, and I think it has to do with the release of gitdb that has been done yesterday. Is there something wrong in the dependencies?

This is how you can replicate this error in a docker container:

docker run -it ubuntu
apt update && apt install python-pip -y
pip install -U GitPython==2.1.14

Output:

Collecting GitPython==2.1.14
  Downloading https://files.pythonhosted.org/packages/2e/93/c26103b14766b83d6c2f7d2a29aa8540058c2970f2c80b13c25720764b70/GitPython-2.1.14-py2.py3-none-any.whl (452kB)
    100% |################################| 460kB 1.9MB/s 
Collecting gitdb2>=2.0.0 (from GitPython==2.1.14)
  Downloading https://files.pythonhosted.org/packages/97/97/6ad081c9f3efa1545fd11149f14602a53e2003c153312c8bfa825ba27b89/gitdb2-4.0.2.tar.gz
Collecting gitdb>=4.0.1 (from gitdb2>=2.0.0->GitPython==2.1.14)
  Could not find a version that satisfies the requirement gitdb>=4.0.1 (from gitdb2>=2.0.0->GitPython==2.1.14) (from versions: 0.5.0, 0.5.1, 0.5.2, 0.5.3, 0.5.4, 0.6.0, 0.6.1, 0.6.2, 0.6.3, 0.6.4)
No matching distribution found for gitdb>=4.0.1 (from gitdb2>=2.0.0->GitPython==2.1.14)
@thraxil
Copy link

thraxil commented Feb 24, 2020

Ran into the same thing. This appears to be a python 2.7 problem. Something about the recent update makes pip get confused trying to find a version of gitdb/gitdb2 that fulfills the requirements.

My current workaround is to pin gitdb2 to 2.0.6 (last version I could find that supports 2.7):

docker run -it ubuntu
apt update && apt install python-pip -y
pip install gitdb2==2.0.6
pip install GitPython==2.1.14

@vikramhansawat
Copy link

I also tried the same workaround.

@Nicusor97
Copy link

Same for me and I added a fixed for that: #60. There seem to be some differences between gitdb and gitdb2 packages.

@Harmon758
Copy link
Member

Harmon758 commented Feb 24, 2020

gitdb2 was changed to mirror gitdb, so that we could transition back to using the gitdb package name (#59). Since it's a mirror package, I didn't include a lot of the metadata, including that it requires Python >= 3.4, and I'd rather not have to add it specifically for Python 2 support (#60 (comment), #60 (comment)).

However, the latest version of GitPython that supports Python 2, v2.1.15, should still work without any issues, as that version locks gitdb2 to < 3 (gitpython-developers/GitPython@bcf9f1c). This was done and released as v2.1.15 when GitDB dropped Python 2 support (gitpython-developers/GitPython#897 (comment)) in v3.0.0.

Unfortunately, older versions of GitPython v2 did not have an upper bound for the gitdb2 requirement version specifier (gitpython-developers/GitPython#897 (comment)). If for some reason, you need to use an older version of GitPython, you can specify a version requirement of < 3 for gitdb2 yourself. I would recommend updating to GitPython v2.1.15 instead though.

I'm still considering #60, so let me know if you have a situation where you cannot upgrade GitPython to v2.1.15 or pin gitdb2 to < 3 yourself. See also #60 (comment).

@Rayman
Copy link
Author

Rayman commented Feb 24, 2020

GitPython released 3.1.0 to fix this problem: gitpython-developers/GitPython@c859019

I still think GitDB should have the correct dependencies to prevent this problem. Now every upstream package has to fix this.

@Harmon758
Copy link
Member

GitPython 3.1.0 was released to switch back to the gitdb package name now that gitdb2 is a mirror package. Again, see #59.

There's no issues with dependencies. The only upstream package is smmap and it's not affected by this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

5 participants