“Value for [key] does not match” warnings in pip 21.2
See original GitHub issueThis is spun off #9617 to aggregate user feedback for another round of pip’s location backend switch from distutils
to sysconfig
. If you find yourself seeing something like:
WARNING: Value for scheme.scripts does not match. Please report this to <https://github.com/pypa/pip/issues/10151
What you need to do?
- Check your version of pip. New reports that don’t mention the pip version, or against versions before 21.2.4 will be ignored.
- Comment below with content like this so we can learn about your environment:
Output of 'pip debug':
```
pip version: pip X.Y.Z from /....
sys.version: ...
sys.executable: /path/to/python
...
```
Error output:
```
WARNING: Value for [location-key] does not match. Please report this to ...
distutils: /xxxxx
sysconfig: /yyyyy
WARNING: Additional context:
user = False
home = None
root = None
prefix = None
```
Please:
- Upgrade to pip 21.2.4 or higher and fill the template above.
- Do not post screenshots.
- Always wrap the error output in code block (a pair of three backticks
```
) like the above format. - Once you posted your comment, you can unsubscribe to this issue (but you’re welcomed to stay if you’re inclined to). We will @ you once a fix is available for your specific environment so you can test the fix.
Additional information for those interested:
- This is not an error, you can safely ignore the message. The warning is a means to allow pip developers gather information about environments that may have issues when we switch the location backend.
- Python is going to deprecate distutils in the 3.10 release, with the intention to remove it in 3.12. Therefore, pip is trying to rewrite logic that uses distutils with alternative means provided by the Python standard library. However, distutils contains a lot of legacy edge cases that is difficult to cover, so we are trying to gather information on those edge cases we do not know yet. Once we know about them, we will fix them, so when 3.12 lands everyone can switch to the new location backend without anything breaking.
- If the warning message causes your workflow to fail (due to an organisational no-warning restriction, for example), you can set the
_PIP_LOCATIONS_NO_WARN_ON_MISMATCH=1
environment variable to suppress this warning. The message will only be visible withpip -vv
(and to stdout instead of stderr) with this flag set.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:34
- Comments:458 (71 by maintainers)
Top Results From Across the Web
selenium.common.exceptions.invalidargumentexception ...
Failed: [k8s.io] ScheduledJob should not emit unexpected warnings {Kubernetes e2e ... pypa/pip“Value for [key] does not match” warnings in pip 21.2#10151.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
While installing requirements.txt for a Django project I am getting this warning.
sigh
Please don’t devolve this thread into a sequence of memes. This is a very targeted issue, for getting user inputs on a very specific issue – gathering inputs from users, about mismatches in the
distutils.sysconfig
paths vssysconfig
paths.If you wish to post memes or do anything else that’s similarly off topic, please do that somewhere else. This isn’t r/ProgrammerHumor, nor is this r/Python.
Regarding the rant about how setting up a “proper” Python environment is difficult – I’m sure folks over on python-tutor and #help-* on the Python Discord would be more than happy to help you out.
I appreciate and empathize with the problems of getting Python set up in “the right way” on a machine. There are gonna be 3-30 of ways to get Python on any platform, and it’s often possible to get Python installations from multiple places. The resources on the internet all suggest different things, and have contradicting suggestions. All of this is exceedingly annoying if you also have a messed up PATH situation, where
pip
andpython
are actually not from the same installation. One important thing I’ll flag, is that if you’re confused about what is happening, usepython -m pip
/python3 -m pip
etc; instead ofpip
directly. None the less, this isn’t the right place to discuss the implications of all this though, and I hope that something like https://github.com/pypa/pip/issues/3164#issuecomment-398216682 will improve the story on these fronts.