Python 3.6.9 (default, Dec 9 2019, 14:06:32) [GCC 4.2.1 Compatible FreeBSD Clang 8.0.0 (tags/RELEASE_800/final 356365)] on freebsd11 Type "help", "copyright", "credits" or "license" for more information. >>> import pygit2 Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python3.6/site-packages/pygit2/__init__.py", line 34, in <module> from .config import Config File "/usr/local/lib/python3.6/site-packages/pygit2/config.py", line 26, in <module> from cached_property import cached_property ModuleNotFoundError: No module named 'cached_property' According to the changelog, PyGit2 has required cached-property since v1.1.0. https://github.com/libgit2/pygit2/blob/master/CHANGELOG.rst#110-2020-03-01
A commit references this bug: Author: mfechner Date: Fri May 1 19:17:28 UTC 2020 New revision: 533582 URL: https://svnweb.freebsd.org/changeset/ports/533582 Log: Added missing dependency to cached-property which is required since 1.1.0: https://github.com/libgit2/pygit2/blob/master/CHANGELOG.rst#110-2020-03-01 PR: 246098 Reported by: ahktenzero+freebsd@mohorovi.cc Changes: head/devel/py-pygit2/Makefile
Thanks a lot! I added the dependency and import works now. Thanks for the example to reproduce it.