When using python3 with the pygit dependency, I hit an error that says:
Traceback (most recent call last):
File "generate.py", line 8, in <module>
from git import Repo, NoSuchPathError, InvalidGitRepositoryError
File "/mnt/c/Users/foo/venv/lib/python3.6/site-packages/git/__init__.py", line 6, in <module>
from repository import Repository, InvalidRepositoryError
ModuleNotFoundError: No module named 'repository'
If I find in site-packages, I find a module called repository. What's the deal?
You meant to use a different module called gitpython. You'll want to uninstall pygit and get gitpython instead.
Pro-tip: use a requirements.txt file to lock down your dependencies to prevent this from happening.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With