Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix for assert '_distutils' in core.__file__, core.__file__ failing #101

Open
HitLuca opened this issue Jan 4, 2022 · 2 comments
Open
Labels
good first issue Good for newcomers

Comments

@HitLuca
Copy link

HitLuca commented Jan 4, 2022

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!

@Madoshakalaka Madoshakalaka added the good first issue Good for newcomers label Jan 5, 2022
@geokaragiannis
Copy link

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

@wangsha
Copy link

wangsha commented Apr 1, 2022

created a github-action with the fix https://github.com/marketplace/actions/run-pipenv-setup

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

4 participants