-
-
Notifications
You must be signed in to change notification settings - Fork 783
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
Installing environments fails: No matching distribution found for setuptools>=38.2.5 #960
Comments
That error looks like either your installation of python3.6 is broken, pypi was temporarily down, or your dns settings are broken -- none of which pre-commit can do anything about. Does it persist if you try again? |
I found this which is potentially related: pypa/pip#5568 |
Does this mean, pre-commit installs the required packages within a virtual environment? Because it even fails, if I run it outside of a venv. It worked at home, but failed on the machine of a work collegue. I fear it's somehow related to our network config (which we cannot change). |
I now notice, the commands are run from the And if I run
But if this is triggered by |
that is very weird! If you re-run The |
@mnboos any updates? |
It's not working yet. Setting PYTHONPATH didn't help either. I don't want to blame pre-commit, because it seems to work for everbody else and it works on my Ubuntu VM. |
It's interesting to me that Can you run this for me? python -c 'import pprint, os; pprint.pprint(tuple(sorted(os.environ.items())))' And try putting this near the beginning of import os, pprint
pprint.pprint(tuple(sorted(os.environ.items()))) And then running Can you also run each of these commands and produce their output here? Might help in debugging what's different 🤔 which -a pre-commit
grep INSTALL_PYTHON .git/hooks/pre-commit
python -c 'import pre_commit; print(pre_commit.__file__)'
echo $HOMEPATH
echo $PRE_COMMIT_HOME
echo $XDG_CACHE_HOME
python3 -c 'import os.path; print(os.path.expanduser('~/.cache') |
Just for clarification: I'm using a Windows machine here, not Linux (i.e. it works on Linux, not on this Windows machine)
|
I found a workaround (i.e.
|
Interesting, that does appear to be the difference. Here's the relevant diff from the environ splat that I can see: --- outside 2019-03-11 08:38:34.857174146 -0700
+++ inside 2019-03-11 08:38:46.916672996 -0700
...
+ ('HOME', 'F:\\'), What I believe is happening:
In your case, I'd suggest the following workaround instead, to Is that something you can configure for your user? |
I've created a bpo issue for this: https://bugs.python.org/issue36264 |
yay, python3.8 will ship with a fix to I couldn't figure out how to send an issue to mingw for the I think there's nothing left to do here so I'm closing this -- thanks for the issue 🎉 |
Awesome! Thanks a lot for your support! |
Each time I try to commit something, the following error appears:
Python version: 3.6.7
.pre-commit-config.yaml
The text was updated successfully, but these errors were encountered: