Reputation: 725
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?
Upvotes: 4
Views: 6417
Reputation: 725
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.
Upvotes: 6