question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

“Value for [key] does not match” warnings in pip 21.2

See original GitHub issue

This 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?

  1. Check your version of pip. New reports that don’t mention the pip version, or against versions before 21.2.4 will be ignored.
  2. 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 with pip -vv (and to stdout instead of stderr) with this flag set.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:34
  • Comments:458 (71 by maintainers)

github_iconTop GitHub Comments

5reactions
rupanshu1710commented, Jul 31, 2021

While installing requirements.txt for a Django project I am getting this warning.

C:\Users\Dell\FR_updateAI\core>pip install -r  requirements.txt
WARNING: Value for scheme.platlib does not match. Please report this to <https://github.com/pypa/pip/issues/10151>
distutils: c:\msys64\mingw64\lib\python3.8\site-packages
sysconfig: c:\msys64\mingw64\lib\python3.8
WARNING: Value for scheme.purelib does not match. Please report this to <https://github.com/pypa/pip/issues/10151>
distutils: c:\msys64\mingw64\lib\python3.8\site-packages
sysconfig: c:\msys64\mingw64\lib\python3.8
WARNING: Additional context:
user = False
home = None
root = None
prefix = None
4reactions
pradyunsgcommented, Oct 13, 2021

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 vs sysconfig 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 and python are actually not from the same installation. One important thing I’ll flag, is that if you’re confused about what is happening, use python -m pip / python3 -m pip etc; instead of pip 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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found