1

I am using python 3.6.5 and i have installed the gitpython on using pip. After the installation i have tried to import that but i am unable to import this library. Getting below error:

Python 3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 17:00:18) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from git import Repo
Traceback (most recent call last):
 File "<stdin>", line 1, in <module>
 File "C:\Program Files\Python36\lib\site-packages\git\__init__.py", line 8, in <module>
 from git.exc import * # @NoMove @IgnorePep8
 File "C:\Program Files\Python36\lib\site-packages\git\exc.py", line 10, in <module>
 from git.compat import safe_decode
 File "C:\Program Files\Python36\lib\site-packages\git\compat.py", line 32, in <module>
 from git.types import TBD
 File "C:\Program Files\Python36\lib\site-packages\git\types.py", line 12, in <module>
 from typing_extensions import Final, Literal, SupportsIndex # noqa: F401
ImportError: cannot import name 'SupportsIndex'

how to resolve this issue?

torek
500k71 gold badges765 silver badges892 bronze badges
asked Oct 12, 2021 at 10:51

1 Answer 1

1

As described in gitpython pypi https://pypi.org/project/GitPython/ it requires python version 3.7 or higher, so you have to install python3.7 and use python3.7 or higher and reinstall gitpython

answered Oct 12, 2021 at 11:04
Sign up to request clarification or add additional context in comments.

1 Comment

Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.