pipenv-setup
pipenv-setup copied to clipboard
fix for assert '_distutils' in core.__file__, core.__file__ failing
looks like something broke in the setuptools project in the last couple of days, and consequently, pipenv-setup
errors out when called. This should only happen with the latest pip version but I am not 100% sure.
Anyway, a quick fix for this is to export an env var before calling the command, like below
export SETUPTOOLS_USE_DISTUTILS=stdlib
pipenv-setup check
cheers!
I was able to resolve this issue by folllowing the above. Thanks @HitLuca
In my case, running pipenv-setup check --strict
was giving the following warning:
UserWarning: Distutils was imported before Setuptools, but importing Setuptools also replaces the `distutils` module in `sys.modules`.
This may lead to undesirable behaviors or errors.
To avoid these issues, avoid using distutils directly, ensure that setuptools is installed in the traditional way (e.g. not an editable install), and/or make sure that setuptools is always imported before distutils.
which was followed by an AssertionError
in distutils/core.py
Python: 3.8 Setuptools version: 60.5.0
created a github-action with the fix https://github.com/marketplace/actions/run-pipenv-setup