Open exploide opened 5 months ago
For those that encounter the same issue, I found that injecting setuptools within the certipy-ad pipx environment helps with the error "ModuleNotFoundError: No module named 'pkg_resources":
pipx inject certipy-ad setuptools
Certipy does not only depend on
setuptools
during build time, it is also a runtime dependency because in https://github.com/ly4k/Certipy/blob/2780d5361121dd4ec79da3f64cfb1984c4f779c6/certipy/version.py#L1 thepkg_resources
module is imported, which comes from thesetuptools
package.If you install Certipy in a fresh environment (e.g. a new virtualenv, or via pipx, at least with Python 3.12) the module is not available and the following error occurs:
As a quick fix,
setuptools
should be added to theinstall_requires
section ofsetup.py
. However, according to the setuptools docspkg_resources
is deprecated anyway and should be substituted.