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

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.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 33
  • Comments: 467 (75 by maintainers)

Commits related to this issue

Most upvoted comments

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

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.

Could you all not make the code smaller in for example in a spoiler. You make the “Issue Post” especially confusing, so that we certainly must open a new “Issue Post”. Just the scrolling ist fucking annoying. Why when you see that a person, who have the same issue, how you, why you post your issue report. Instead you give the person a thumps up oder similar. I really don´t unterstand it.

Hey, let’s focus on fixing what needs to be fixed, please 🙂

Once you reported your issue, you can safely unsubscribe to this thread so you don’t get bombarded by further notifications. I am actively categorising reports in this thread into separate issues, and will ping people in the ones to them relevant. You are not going to miss things that matter to you, I promise.

I figured the problem out. distutils.get_python_lib() does not use the install schemes at all. It joins the paths together by assumptions and glue:

https://github.com/python/cpython/blob/3.10/Lib/distutils/sysconfig.py#L309

I hate this. Glad that pip 21.3 uses sysconfig directly. Thanks for your help!

Deadsnakes is backporting the upstream Debian/Ubuntu package, and there’s a bug in the upstream. I’ve filed this to https://bugs.launchpad.net/ubuntu/+source/python3.10/+bug/1940705

People, please read the first post in this thread and supply information about your environment. If you don’t, I’ll just assume you’re running 21.2.1 and ignore your report.

@KanTakahiro @siddhpant Interesting… So it seems like this mismatch only happens when you build from source for the first time. I’ll need to investigate more. Many thanks, both your inputs are super helpful.

@DarrienG Rocky Linux is the community version of new RHEL similar to CentOS 7 was to old RHEL versions, right? I’m trying to get an idea where to categories it under.

Yes. CentOS 8 will be EOL at the end of 2021, Rocky Linux 8 will be a rebuild of RHEL 8 until 2029.

➜  ~ sudo -H pip3 install --upgrade pip
Password:
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Requirement already satisfied: pip in /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/site-packages (21.2.4)
Collecting pip
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/1f/2c/d9626f045e7b49a6225c6b09257861f24da78f4e5f23af2ddbdf852c99b8/pip-22.2.2-py3-none-any.whl (2.0 MB)
     |████████████████████████████████| 2.0 MB 606 kB/s
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 21.2.4
    WARNING: Value for bin_prefix does not match. Please report this to <https://github.com/pypa/pip/issues/10151>
    distutils: /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/bin
    sysconfig: /usr/local/bin
    WARNING: Additional context:
    user = False
    home = None
    root = None
    prefix = None
    Uninstalling pip-21.2.4:
      Successfully uninstalled pip-21.2.4
Successfully installed pip-22.2.2

The general suggestions should be:

  1. If you’re using < 21.3, upgrade. (If you can’t upgrade because the pip is from /usr/bin, talk to your Linux distributor e.g. Red Hat; it’s their bug.)
  2. If you see it when compiling/installing Python, just ignore it. It’s a false positive and you won’t see it again (unless you re-compile).

@DiddiLeija sorry about this, thought I had upgraded pip and didnt verify this first. RHEL 9 is shipping with 21.2.3, you can disregard mine.

Was compiling python3 for Raspberry Pi 3, and it spit out this error DCF8BC1E-CB0E-45E6-9EDC-19FAFC8FF2D1

While building Python-3.9.9 on AIX - “make install” when using DESTDIR reports:

/opt/bin/make install DESTDIR=/var/aixtools/python/py39/3.9.9.0 > .buildaix/install.out
WARNING: Value for scheme.headers does not match. Please report this to <https://github.com/pypa/pip/issues/10151>
distutils: /var/aixtools/python/py39/3.9.9.0/opt/include/python3.9/UNKNOWN
sysconfig: /var/aixtools/python/py39/3.9.9.0/data/prj/python/src/Python-3.9.9/Include/UNKNOWN
WARNING: Additional context:
user = False
home = None
root = '/var/aixtools/python/py39/3.9.9.0/'
prefix = None
  WARNING: Value for scheme.headers does not match. Please report this to <https://github.com/pypa/pip/issues/10151>
  distutils: /var/aixtools/python/py39/3.9.9.0/opt/include/python3.9/setuptools
  sysconfig: /var/aixtools/python/py39/3.9.9.0/data/prj/python/src/Python-3.9.9/Include/setuptools
  WARNING: Value for scheme.headers does not match. Please report this to <https://github.com/pypa/pip/issues/10151>
  distutils: /var/aixtools/python/py39/3.9.9.0/opt/include/python3.9/pip
  sysconfig: /var/aixtools/python/py39/3.9.9.0/data/prj/python/src/Python-3.9.9/Include/pip
  WARNING: The scripts pip3 and pip3.9 are installed in '/var/aixtools/python/py39/3.9.9.0/opt/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
  • imho: the distutils PATH look correct (after stripping the DESTDIR prefix); the sysconfig paths seem to be based on the oot (out-of-tree) sources.
  • there is no error section in the debug output, so the message above may only be occuring as part of the make install process (in particular to a DESTDIR)
root@x066:[/data/prj/python/py39-3.9.9]pip3 debug
WARNING: This command is only meant for debugging. Do not use this with automation for parsing and getting these details, since the output and options of this command may change without notice.
pip version: pip 21.2.4 from /opt/lib/python3.9/site-packages/pip (python 3.9)
sys.version: 3.9.9 (main, Jan 12 2022, 18:54:24) [C]
sys.executable: /opt/bin/python3.9
sys.getdefaultencoding: utf-8
sys.getfilesystemencoding: iso8859-1
locale.getpreferredencoding: ISO8859-1
sys.platform: aix
sys.implementation:
  name: cpython
'cert' config value: Not specified
REQUESTS_CA_BUNDLE: None
CURL_CA_BUNDLE: None
pip._vendor.certifi.where(): /opt/lib/python3.9/site-packages/pip/_vendor/certifi/cacert.pem
pip._vendor.DEBUNDLED: False
vendored library versions:
  appdirs==1.4.4
  CacheControl==0.12.6
  colorama==0.4.4
  distlib==0.3.2
  distro==1.5.0 (Unable to locate actual module version, using vendor.txt specified version)
  html5lib==1.1
  msgpack==1.0.2 (Unable to locate actual module version, using vendor.txt specified version)
  packaging==21.0
  pep517==0.11.0
  progress==1.5
  pyparsing==2.4.7
  requests==2.26.0
  certifi==2021.05.30
  chardet==4.0.0
  idna==3.2
  urllib3==1.26.6
  resolvelib==0.7.1
  setuptools==44.0.0 (Unable to locate actual module version, using vendor.txt specified version)
  six==1.16.0
  tenacity==8.0.1 (Unable to locate actual module version, using vendor.txt specified version)
  tomli==1.0.3
  webencodings==0.5.1 (Unable to locate actual module version, using vendor.txt specified version)
Compatible tags: 33
  cp39-cp39-aix_6107_1216_64
  cp39-abi3-aix_6107_1216_64
  cp39-none-aix_6107_1216_64
  cp38-abi3-aix_6107_1216_64
  cp37-abi3-aix_6107_1216_64
  cp36-abi3-aix_6107_1216_64
  cp35-abi3-aix_6107_1216_64
  cp34-abi3-aix_6107_1216_64
  cp33-abi3-aix_6107_1216_64
  cp32-abi3-aix_6107_1216_64
  ...
  [First 10 tags shown. Pass --verbose to show all.]
  • Hope this helps

will it help if I give you access to a VM running slackware 15?

That would be awesome!

@uranusjr , I sent you a private email.

Output of pip debug

WARNING: This command is only meant for debugging. Do not use this with automation for parsing and getting these details, since the output and options of this command may change without notice.
pip version: pip 21.3.1 from /usr/lib/python3.10/dist-packages/pip (python 3.10)
sys.version: 3.10.0 (default, Oct  4 2021, 22:09:55) [GCC 9.3.0]
sys.executable: /usr/bin/python3.10
sys.getdefaultencoding: utf-8
sys.getfilesystemencoding: utf-8
locale.getpreferredencoding: UTF-8
sys.platform: linux
sys.implementation:
  name: cpython
'cert' config value: Not specified
REQUESTS_CA_BUNDLE: None
CURL_CA_BUNDLE: None
pip._vendor.certifi.where(): /usr/lib/python3.10/dist-packages/pip/_vendor/certifi/cacert.pem
pip._vendor.DEBUNDLED: False
vendored library versions:
  CacheControl==0.12.6
  colorama==0.4.4
  distlib==0.3.3
  distro==1.6.0
  html5lib==1.1
  msgpack==1.0.2 (Unable to locate actual module version, using vendor.txt specified version)
  packaging==21.0
  pep517==0.12.0
  platformdirs==2.4.0
  progress==1.6
  pyparsing==2.4.7
  requests==2.26.0
  certifi==2021.05.30
  chardet==4.0.0
  idna==3.2
  urllib3==1.26.7
  resolvelib==0.8.0
  setuptools==44.0.0 (Unable to locate actual module version, using vendor.txt specified version)
  six==1.16.0
  tenacity==8.0.1 (Unable to locate actual module version, using vendor.txt specified version)
  tomli==1.0.3
  webencodings==0.5.1 (Unable to locate actual module version, using vendor.txt specified version)
Compatible tags: 726
  cp310-cp310-manylinux_2_31_x86_64
  cp310-cp310-manylinux_2_30_x86_64
  cp310-cp310-manylinux_2_29_x86_64
  cp310-cp310-manylinux_2_28_x86_64
  cp310-cp310-manylinux_2_27_x86_64
  cp310-cp310-manylinux_2_26_x86_64
  cp310-cp310-manylinux_2_25_x86_64
  cp310-cp310-manylinux_2_24_x86_64
  cp310-cp310-manylinux_2_23_x86_64
  cp310-cp310-manylinux_2_22_x86_64
  ...
  [First 10 tags shown. Pass --verbose to show all.]

Error Output:

WARNING: Value for scheme.purelib does not match. Please report this to <https://github.com/pypa/pip/issues/10151>
distutils: /usr/lib/python3.10/dist-packages
sysconfig: /usr/lib/python3.10/site-packages
WARNING: Additional context:
user = False
home = None
root = None
prefix = None

Hi, I got the following message that tells to post the issue here, so I do. I installed python3.10 from the ‘deadsnakes PPA’. This is an Azure Ubuntu VM.

xxxxx@xxxxx:xxxxx$ python3.10 -m ensurepip --upgrade WARNING: Value for scheme.platlib does not match. Please report this to https://github.com/pypa/pip/issues/10151 distutils: /usr/lib/python3.10/dist-packages sysconfig: /usr/lib/python3.10/site-packages WARNING: Value for scheme.purelib does not match. Please report this to https://github.com/pypa/pip/issues/10151 distutils: /usr/lib/python3.10/dist-packages sysconfig: /usr/lib/python3.10/site-packages WARNING: Additional context: user = False home = None root = None prefix = None Defaulting to user installation because normal site-packages is not writeable Looking in links: /tmp/tmpcfhglzmc Requirement already satisfied: setuptools in /usr/lib/python3/dist-packages (39.0.1) Processing /tmp/tmpcfhglzmc/setuptools-57.4.0-py3-none-any.whl Requirement already satisfied: pip in /usr/lib/python3/dist-packages (9.0.1) Processing /tmp/tmpcfhglzmc/pip-21.2.3-py3-none-any.whl Installing collected packages: setuptools, pip WARNING: The scripts pip3 and pip3.10 are installed in ‘/home/xxxxx/.local/bin’ which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. Successfully installed pip-21.2.3 setuptools-57.4.0

This is at the end for python.3.10 build in Linux: WARNING: Value for scheme.headers does not match. Please report this to https://github.com/pypa/pip/issues/10151 distutils: /common/dev/slevin/tools/Python.3.10.0/include/python3.10/UNKNOWN sysconfig: /common/dev/slevin/distrib/Python-3.10.0/Include/UNKNOWN WARNING: Additional context: user = False home = None root = ‘/’ prefix = None Looking in links: /tmp/tmp61lc_79p Processing /tmp/tmp61lc_79p/setuptools-57.4.0-py3-none-any.whl Processing /tmp/tmp61lc_79p/pip-21.2.3-py3-none-any.whl Installing collected packages: setuptools, pip WARNING: Value for scheme.headers does not match. Please report this to https://github.com/pypa/pip/issues/10151 distutils: /common/dev/slevin/tools/Python.3.10.0/include/python3.10/setuptools sysconfig: /common/dev/slevin/distrib/Python-3.10.0/Include/setuptools WARNING: Value for scheme.headers does not match. Please report this to https://github.com/pypa/pip/issues/10151 distutils: /common/dev/slevin/tools/Python.3.10.0/include/python3.10/pip sysconfig: /common/dev/slevin/distrib/Python-3.10.0/Include/pip WARNING: The scripts pip3 and pip3.10 are installed in ‘/common/dev/slevin/tools/Python.3.10.0/bin’ which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. Successfully installed pip-21.2.3 setuptools-57.4.0

Here we go again. In Fedora, we have recently changed our patch of distutils to patch sysconfig instead. The details are in https://lists.fedoraproject.org/archives/list/python-devel@lists.fedoraproject.org/thread/AAGUFQZ4RZDU7KUN4HA43KQJCMSFR3GW/

I was afraid this will break things, but we have thoroughly tested almost everything we could and it worked. Until a fellow Fedoran told me their test is failing in upstream CI: https://github.com/rhinstaller/anaconda/runs/3876995865?check_suite_focus=true

Note that this is Python 3.10, so distutils reads the information from sysconfig. I expected no mismatches. Yet we get them:

$ podman run --rm -ti fedora:rawhide /usr/bin/bash
[root@3316609934c9 /]# dnf install python3-pip
...
[root@3316609934c9 /]# rpm -q python3
python3-3.10.0-2.fc36.x86_64

[root@3316609934c9 /]# rpm -q python3-pip
python3-pip-21.2.3-4.fc36.noarch

[root@3316609934c9 /]# rpm -q python3-setuptools
python3-setuptools-57.4.0-1.fc35.noarch

[root@3316609934c9 /]# pip install lazy-object-proxy==1.6.0
Collecting lazy-object-proxy==1.6.0
  Downloading lazy-object-proxy-1.6.0.tar.gz (44 kB)
     |████████████████████████████████| 44 kB 794 kB/s 
  WARNING: Value for prefixed-purelib does not match. Please report this to <https://github.com/pypa/pip/issues/10151>
  distutils: /tmp/pip-build-env-gfxe2d2m/normal/lib/python3.10/site-packages
  sysconfig: /tmp/pip-build-env-gfxe2d2m/normal/local/lib/python3.10/site-packages
  WARNING: Value for prefixed-platlib does not match. Please report this to <https://github.com/pypa/pip/issues/10151>
  distutils: /tmp/pip-build-env-gfxe2d2m/normal/lib64/python3.10/site-packages
  sysconfig: /tmp/pip-build-env-gfxe2d2m/normal/local/lib64/python3.10/site-packages
  WARNING: Additional context:
  user = False
  home = None
  root = None
  prefix = '/tmp/pip-build-env-gfxe2d2m/normal'
  WARNING: Value for prefixed-purelib does not match. Please report this to <https://github.com/pypa/pip/issues/10151>
  distutils: /tmp/pip-build-env-gfxe2d2m/overlay/lib/python3.10/site-packages
  sysconfig: /tmp/pip-build-env-gfxe2d2m/overlay/local/lib/python3.10/site-packages
  WARNING: Value for prefixed-platlib does not match. Please report this to <https://github.com/pypa/pip/issues/10151>
  distutils: /tmp/pip-build-env-gfxe2d2m/overlay/lib64/python3.10/site-packages
  sysconfig: /tmp/pip-build-env-gfxe2d2m/overlay/local/lib64/python3.10/site-packages
  WARNING: Additional context:
  user = False
  home = None
  root = None
  prefix = '/tmp/pip-build-env-gfxe2d2m/overlay'
  WARNING: Value for purelib does not match. Please report this to <https://github.com/pypa/pip/issues/10151>
  distutils: /usr/lib/python3.10/site-packages
  sysconfig: /usr/local/lib/python3.10/site-packages
  WARNING: Additional context:
  user = False
  home = None
  root = None
  prefix = None
  WARNING: Value for platlib does not match. Please report this to <https://github.com/pypa/pip/issues/10151>
  distutils: /usr/lib64/python3.10/site-packages
  sysconfig: /usr/local/lib64/python3.10/site-packages
  Installing build dependencies ... done
  WARNING: Missing build requirements in pyproject.toml for lazy-object-proxy==1.6.0 from https://files.pythonhosted.org/packages/bb/f5/646893a04dcf10d4acddb61c632fd53abb3e942e791317dcdd57f5800108/lazy-object-proxy-1.6.0.tar.gz#sha256=489000d368377571c6f982fba6497f2aa13c6d1facc40660963da62f5c379726.
  WARNING: The project does not specify a build backend, and pip cannot fall back to setuptools without 'setuptools>=40.8.0' and 'wheel'.
  Getting requirements to build wheel ... done
ERROR: Exception:
Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/pip/_internal/cli/base_command.py", line 173, in _main
    status = self.run(options, args)
  File "/usr/lib/python3.10/site-packages/pip/_internal/cli/req_command.py", line 203, in wrapper
    return func(self, options, args)
  File "/usr/lib/python3.10/site-packages/pip/_internal/commands/install.py", line 315, in run
    requirement_set = resolver.resolve(
  File "/usr/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 94, in resolve
    result = self._result = resolver.resolve(
  File "/usr/lib/python3.10/site-packages/pip/_vendor/resolvelib/resolvers.py", line 472, in resolve
    state = resolution.resolve(requirements, max_rounds=max_rounds)
  File "/usr/lib/python3.10/site-packages/pip/_vendor/resolvelib/resolvers.py", line 341, in resolve
    self._add_to_criteria(self.state.criteria, r, parent=None)
  File "/usr/lib/python3.10/site-packages/pip/_vendor/resolvelib/resolvers.py", line 172, in _add_to_criteria
    if not criterion.candidates:
  File "/usr/lib/python3.10/site-packages/pip/_vendor/resolvelib/structs.py", line 151, in __bool__
    return bool(self._sequence)
  File "/usr/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 140, in __bool__
    return any(self)
  File "/usr/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 128, in <genexpr>
    return (c for c in iterator if id(c) not in self._incompatible_ids)
  File "/usr/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 32, in _iter_built
    candidate = func()
  File "/usr/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 207, in _make_candidate_from_link
    self._link_candidate_cache[link] = LinkCandidate(
  File "/usr/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 295, in __init__
    super().__init__(
  File "/usr/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 156, in __init__
    self.dist = self._prepare()
  File "/usr/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 227, in _prepare
    dist = self._prepare_distribution()
  File "/usr/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 305, in _prepare_distribution
    return self._factory.preparer.prepare_linked_requirement(
  File "/usr/lib/python3.10/site-packages/pip/_internal/operations/prepare.py", line 508, in prepare_linked_requirement
    return self._prepare_linked_requirement(req, parallel_builds)
  File "/usr/lib/python3.10/site-packages/pip/_internal/operations/prepare.py", line 570, in _prepare_linked_requirement
    dist = _get_prepared_distribution(
  File "/usr/lib/python3.10/site-packages/pip/_internal/operations/prepare.py", line 60, in _get_prepared_distribution
    abstract_dist.prepare_distribution_metadata(finder, build_isolation)
  File "/usr/lib/python3.10/site-packages/pip/_internal/distributions/sdist.py", line 34, in prepare_distribution_metadata
    self._setup_isolation(finder)
  File "/usr/lib/python3.10/site-packages/pip/_internal/distributions/sdist.py", line 88, in _setup_isolation
    reqs = backend.get_requires_for_build_wheel()
  File "/usr/lib/python3.10/site-packages/pip/_vendor/pep517/wrappers.py", line 168, in get_requires_for_build_wheel
    return self._call_hook('get_requires_for_build_wheel', {
  File "/usr/lib/python3.10/site-packages/pip/_vendor/pep517/wrappers.py", line 328, in _call_hook
    raise BackendUnavailable(data.get('traceback', ''))
pip._vendor.pep517.wrappers.BackendUnavailable: Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 89, in _build_backend
    obj = import_module(mod_path)
  File "/usr/lib64/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 992, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1004, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'setuptools'


[root@3316609934c9 /]# python3
Python 3.10.0 (default, Oct  5 2021, 00:00:00) [GCC 11.2.1 20210728 (Red Hat 11.2.1-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sysconfig
>>> sysconfig.get_path("platlib")
'/usr/local/lib64/python3.10/site-packages'
>>> import distutils.command.install
<stdin>:1: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
>>> distutils.command.install.INSTALL_SCHEMES["unix_prefix"]["platlib"]
'$platbase/local/$platlibdir/python$py_version_short/site-packages'

I honestly have no idea what’s happening here. The new version of pip that uses just sysconfig works fine so we will likely resolve this issue by upgrading, but I am still perplexed how can the distutils path differ from the sysconfig one.

Running sudo make install on a freshly-updated CPython.

Output of pip debug:

WARNING: This command is only meant for debugging. Do not use this with automation for parsing and getting these details, since the output and options of this command may change without notice.
pip version: pip 21.2.3 from /usr/local/lib/python3.11/site-packages/pip (python 3.11)
sys.version: 3.11.0a0 (heads/main:dc878240dc, Oct  3 2021, 10:28:40) [GCC 8.3.0]
sys.executable: /usr/local/bin/python3
sys.getdefaultencoding: utf-8
sys.getfilesystemencoding: utf-8
locale.getpreferredencoding: UTF-8
sys.platform: linux
sys.implementation:
  name: cpython
'cert' config value: Not specified
REQUESTS_CA_BUNDLE: None
CURL_CA_BUNDLE: None
pip._vendor.certifi.where(): /usr/local/lib/python3.11/site-packages/pip/_vendor/certifi/cacert.pem
pip._vendor.DEBUNDLED: False
vendored library versions:
  appdirs==1.4.4
  CacheControl==0.12.6
  colorama==0.4.4
  distlib==0.3.2
  distro==1.5.0 (Unable to locate actual module version, using vendor.txt specified version)
  html5lib==1.1
  msgpack==1.0.2 (Unable to locate actual module version, using vendor.txt specified version)
  packaging==21.0
  pep517==0.11.0
  progress==1.5
  pyparsing==2.4.7
  requests==2.26.0
  certifi==2021.05.30
  chardet==4.0.0
  idna==3.2
  urllib3==1.26.6
  resolvelib==0.7.1
  setuptools==44.0.0 (Unable to locate actual module version, using vendor.txt specified version)
  six==1.16.0
  tenacity==8.0.1 (Unable to locate actual module version, using vendor.txt specified version)
  tomli==1.0.3
  webencodings==0.5.1 (Unable to locate actual module version, using vendor.txt specified version)
Compatible tags: 714
  cp311-cp311-manylinux_2_28_x86_64
  cp311-cp311-manylinux_2_27_x86_64
  cp311-cp311-manylinux_2_26_x86_64
  cp311-cp311-manylinux_2_25_x86_64
  cp311-cp311-manylinux_2_24_x86_64
  cp311-cp311-manylinux_2_23_x86_64
  cp311-cp311-manylinux_2_22_x86_64
  cp311-cp311-manylinux_2_21_x86_64
  cp311-cp311-manylinux_2_20_x86_64
  cp311-cp311-manylinux_2_19_x86_64
  ...
  [First 10 tags shown. Pass --verbose to show all.]

Error output:

WARNING: Value for scheme.headers does not match. Please report this to <https://github.com/pypa/pip/issues/10151>
distutils: /usr/local/include/python3.11/UNKNOWN
sysconfig: /home/rosuav/cpython/Include/UNKNOWN
WARNING: Additional context:
user = False
home = None
root = '/'
prefix = None
Looking in links: /tmp/tmpop_27sho

Those you mentioned are fine. Only those configuring build and installation locations (where should files go on your computer) are deprecated.

@truongsondq Could you post this to #10270 as well?

‘’’ WARNING: Value for scheme.headers does not match. Please report this to http://github.com/pypa/pip/issues/10151 distutils: /usr/local/python3/include/python39/UNKNOWN sysconfig: /home/devel/Python-3.9.7/Include/UNKNOWN WARNING: additional context: user = False home = None root = ‘/’ prefix = None Looking in links: /tmp/tmpfwc215is ‘’’

This is totally unrelated.

Funny you say that because the warning provides a URL that points directly to this issue and instructs the user to report the warning here. That URL should be visible in my original report above.

Looks like another CPython bug; posix_home should also use {platlibdir} instead of hardcoding lib. I’ll raise this to CPython.

Update: Reported as https://bugs.python.org/issue45035

Thanks! I dug around and this seems to be a CPython bug. I will report this upstream and try to suppress this warning for 3.9 (the only version affected; this bug was introduced by the addition of sys.platlibdir, which is used by sysconfig’s posix_user scheme, but not distutils’s equivalent unix_user scheme).

$ which pip

/usr/local/bin/pip

$ pip debug

WARNING: This command is only meant for debugging. Do not use this with automation for parsing and getting these details, since the output and options of this command may change without notice.
pip version: pip 21.2.3 from /usr/local/lib/python3.9/site-packages/pip (python 3.9)
sys.version: 3.9.6 (default, Jul 16 2021, 00:00:00)
[GCC 11.1.1 20210531 (Red Hat 11.1.1-3)]
sys.executable: /usr/bin/python3
sys.getdefaultencoding: utf-8
sys.getfilesystemencoding: utf-8
locale.getpreferredencoding: UTF-8
sys.platform: linux
sys.implementation:
  name: cpython
'cert' config value: Not specified
REQUESTS_CA_BUNDLE: None
CURL_CA_BUNDLE: None
pip._vendor.certifi.where(): /usr/local/lib/python3.9/site-packages/pip/_vendor/certifi/cacert.pem
pip._vendor.DEBUNDLED: False
vendored library versions:
  appdirs==1.4.4
  CacheControl==0.12.6
  colorama==0.4.4
  distlib==0.3.2
  distro==1.5.0 (Unable to locate actual module version, using vendor.txt specified version)
  html5lib==1.1
  msgpack==1.0.2 (Unable to locate actual module version, using vendor.txt specified version)
  packaging==21.0
  pep517==0.11.0
  progress==1.5
  pyparsing==2.4.7
  requests==2.26.0
  certifi==2021.05.30
  chardet==4.0.0
  idna==3.2
  urllib3==1.26.6
  resolvelib==0.7.1
  setuptools==44.0.0 (Unable to locate actual module version, using vendor.txt specified version)
  six==1.16.0
  tenacity==8.0.1 (Unable to locate actual module version, using vendor.txt specified version)
  tomli==1.0.3
  webencodings==0.5.1 (Unable to locate actual module version, using vendor.txt specified version)
Compatible tags: 705
  cp39-cp39-manylinux_2_33_x86_64
  cp39-cp39-manylinux_2_32_x86_64
  cp39-cp39-manylinux_2_31_x86_64
  cp39-cp39-manylinux_2_30_x86_64
  cp39-cp39-manylinux_2_29_x86_64
  cp39-cp39-manylinux_2_28_x86_64
  cp39-cp39-manylinux_2_27_x86_64
  cp39-cp39-manylinux_2_26_x86_64
  cp39-cp39-manylinux_2_25_x86_64
  cp39-cp39-manylinux_2_24_x86_64
  ...
  [First 10 tags shown. Pass --verbose to show all.]

$ rm -rf venv ; /usr/bin/python -m venv venv ; pip install flask Note the lack of activate: user is accidentally invoking system pip

Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: flask in /home/www/.local/lib/python3.9/site-packages (2.0.1)
Requirement already satisfied: itsdangerous>=2.0 in /home/www/.local/lib/python3.9/site-packages (from flask) (2.0.1)
Requirement already satisfied: click>=7.1.2 in /home/www/.local/lib/python3.9/site-packages (from flask) (8.0.1)
Requirement already satisfied: Werkzeug>=2.0 in /home/www/.local/lib/python3.9/site-packages (from flask) (2.0.1)
Requirement already satisfied: Jinja2>=3.0 in /home/www/.local/lib/python3.9/site-packages (from flask) (3.0.1)
Requirement already satisfied: MarkupSafe>=2.0 in /home/www/.local/lib/python3.9/site-packages (from Jinja2>=3.0->flask) (2.0.1)
WARNING: Value for scheme.platlib does not match. Please report this to <https://github.com/pypa/pip/issues/10151>
distutils: /home/www/.local/lib/python3.9/site-packages
sysconfig: /home/www/.local/lib64/python3.9/site-packages
WARNING: Additional context:
user = True
home = None
root = None
prefix = None
pip debug                                                                                                                                                                             2859ms  Thu 05 Aug 2021 09:08:04 PM CEST
WARNING: This command is only meant for debugging. Do not use this with automation for parsing and getting these details, since the output and options of this command may change without notice.
pip version: pip 21.3.dev0 from /home/jens/.local/lib/python3.9/site-packages/pip (python 3.9)
sys.version: 3.9.6 (default, Jul 16 2021, 00:00:00) 
[GCC 11.1.1 20210531 (Red Hat 11.1.1-3)]
sys.executable: /usr/bin/python3
sys.getdefaultencoding: utf-8
sys.getfilesystemencoding: utf-8
locale.getpreferredencoding: UTF-8
sys.platform: linux
sys.implementation:
  name: cpython
'cert' config value: Not specified
REQUESTS_CA_BUNDLE: None
CURL_CA_BUNDLE: None
pip._vendor.certifi.where(): /home/jens/.local/lib/python3.9/site-packages/pip/_vendor/certifi/cacert.pem
pip._vendor.DEBUNDLED: False
vendored library versions:
  appdirs==1.4.4
  CacheControl==0.12.6
  colorama==0.4.4
  distlib==0.3.2
  distro==1.5.0 (Unable to locate actual module version, using vendor.txt specified version)
  html5lib==1.1
  msgpack==1.0.2 (Unable to locate actual module version, using vendor.txt specified version)
  packaging==21.0
  pep517==0.11.0
  progress==1.5
  pyparsing==2.4.7
  requests==2.26.0
  certifi==2021.05.30
  chardet==4.0.0
  idna==3.2
  urllib3==1.26.6
  resolvelib==0.7.1
  setuptools==44.0.0 (Unable to locate actual module version, using vendor.txt specified version)
  six==1.16.0
  tenacity==8.0.1 (Unable to locate actual module version, using vendor.txt specified version)
  tomli==1.0.3
  webencodings==0.5.1 (Unable to locate actual module version, using vendor.txt specified version)
Compatible tags: 705
  cp39-cp39-manylinux_2_33_x86_64
  cp39-cp39-manylinux_2_32_x86_64
  cp39-cp39-manylinux_2_31_x86_64
  cp39-cp39-manylinux_2_30_x86_64
  cp39-cp39-manylinux_2_29_x86_64
  cp39-cp39-manylinux_2_28_x86_64
  cp39-cp39-manylinux_2_27_x86_64
  cp39-cp39-manylinux_2_26_x86_64
  cp39-cp39-manylinux_2_25_x86_64
  cp39-cp39-manylinux_2_24_x86_64
  ...
  [First 10 tags shown. Pass --verbose to show all.]
Requirement already satisfied: pip in /home/jens/.local/lib/python3.9/site-packages (21.3.dev0)
WARNING: Value for scheme.platlib does not match. Please report this to <https://github.com/pypa/pip/issues/10151>
distutils: /home/jens/.local/lib/python3.9/site-packages
sysconfig: /home/jens/.local/lib64/python3.9/site-packages
WARNING: Additional context:
user = True
home = None
root = None
prefix = None

I am no longer seeing my above reported error/warning output

@uranusjr Can’t seem to find comment to edit it, so here is info here. First one: Ubuntu budgie Result of cat /etc/os-release

NAME="Ubuntu"
VERSION="21.04 (Hirsute Hippo)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 21.04"
VERSION_ID="21.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=hirsute
UBUNTU_CODENAME=hirsute

Second one: Raspbian buster Result of cat /etc/os-release

PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

@shotty1 @benelgiac @acere Please post the warning message you are seeing.

@siddhpant What is the command you use when you see the first warning? (the pycairo one; the second one I think I know the issue, will ping you in another thread)

@stephan-cr Can you confirm if the setup mentioned in https://github.com/pypa/pip/issues/10151#issuecomment-888647104 is the same as yours?

@Julien-athstat Do you know what OS is Amazon Cloud9 running on? (The paths look like Ubuntu? But the GCC info says Red Hat…)

@msapiro @mdmintz Wow that’s new! It’s definitely not been reported previously. Those look equivalent, it seems like we shouldn’t show the warning to you in the first place. Could you describe how you set up the environment?

@paulathomas Seems like you hit a bug in GitHub’s rendering engine; I copied the test to a code editor, re-formatted the lines (delete the newline and re-hit enter) and it seems to work now.

@SlidingHorn Yes.

ubuntu 20.04

WARNING: Value for scheme.platlib does not match. Please report this to <https://github.com/pypa/pip/issues/10151>
distutils: /usr/local/lib/python3.8/dist-packages
sysconfig: /usr/lib/python3.8/site-packages
WARNING: Value for scheme.purelib does not match. Please report this to <https://github.com/pypa/pip/issues/10151>
distutils: /usr/local/lib/python3.8/dist-packages
sysconfig: /usr/lib/python3.8/site-packages
WARNING: Value for scheme.headers does not match. Please report this to <https://github.com/pypa/pip/issues/10151>
distutils: /usr/local/include/python3.8/UNKNOWN
sysconfig: /usr/include/python3.8/UNKNOWN
WARNING: Value for scheme.scripts does not match. Please report this to <https://github.com/pypa/pip/issues/10151>
distutils: /usr/local/bin
sysconfig: /usr/bin
WARNING: Value for scheme.data does not match. Please report this to <https://github.com/pypa/pip/issues/10151>
distutils: /usr/local
sysconfig: /usr
WARNING: Additional context:
user = False
home = None
root = None
prefix = None

Hi! using pip to install pysyd:

Output of ‘pip debug’:

pip version: pip 21.2.1 from /Users/cosmicbabs/Library/Python/3.8/lib/python/site-packages/pip (python 3.8)
sys.version: 3.8.11 (default, Jul  3 2021, 09:11:17) 
[Clang 10.0.1 (clang-1001.0.46.4)]
sys.executable: /opt/local/Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8
sys.getdefaultencoding: utf-8
sys.getfilesystemencoding: utf-8
locale.getpreferredencoding: UTF-8
sys.platform: darwin
sys.implementation:
  name: cpython
'cert' config value: Not specified
REQUESTS_CA_BUNDLE: None
CURL_CA_BUNDLE: None
pip._vendor.certifi.where(): /Users/cosmicbabs/Library/Python/3.8/lib/python/site-packages/pip/_vendor/certifi/cacert.pem
pip._vendor.DEBUNDLED: False
vendored library versions:
  appdirs==1.4.4
  CacheControl==0.12.6
  colorama==0.4.4
  distlib==0.3.2
  distro==1.5.0 (Unable to locate actual module version, using vendor.txt specified version)
  html5lib==1.1
  msgpack==1.0.2 (Unable to locate actual module version, using vendor.txt specified version)
  packaging==21.0
  pep517==0.11.0
  progress==1.5
  pyparsing==2.4.7
  requests==2.26.0
  certifi==2021.05.30
  chardet==4.0.0
  idna==3.2
  urllib3==1.26.6
  resolvelib==0.7.1
  setuptools==44.0.0 (Unable to locate actual module version, using vendor.txt specified version)
  six==1.16.0
  tenacity==8.0.1 (Unable to locate actual module version, using vendor.txt specified version)
  tomli==1.0.3
  webencodings==0.5.1 (Unable to locate actual module version, using vendor.txt specified version)
Compatible tags: 1265
  cp38-cp38-macosx_10_14_x86_64
  cp38-cp38-macosx_10_14_intel
  cp38-cp38-macosx_10_14_fat64
  cp38-cp38-macosx_10_14_fat32
  cp38-cp38-macosx_10_14_universal2
  cp38-cp38-macosx_10_14_universal
  cp38-cp38-macosx_10_13_x86_64
  cp38-cp38-macosx_10_13_intel
  cp38-cp38-macosx_10_13_fat64
  cp38-cp38-macosx_10_13_fat32
  ...
  [First 10 tags shown. Pass --verbose to show all.]

Error output: Requirement already satisfied: pysyd in ./Library/Python/3.8/lib/python/site-packages (1.6.6)
Requirement already satisfied: scipy==1.5.1 in ./Library/Python/3.8/lib/python/site-packages (from pysyd) (1.5.1 )
Requirement already satisfied: matplotlib>=1.5.3 in /opt/local/Library/Frameworks/Python.framework/Versions/3.8/ lib/python3.8/site-packages (from pysyd) (3.4.2)
Requirement already satisfied: pandas>=1.0.5 in /opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/ python3.8/site-packages (from pysyd) (1.3.0)
Requirement already satisfied: numpy>=1.16 in /opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/py thon3.8/site-packages (from pysyd) (1.21.1)
Requirement already satisfied: astropy>=4.0.0 in /opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib /python3.8/site-packages (from pysyd) (4.2.1)
Requirement already satisfied: pyerfa in /opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3 .8/site-packages (from astropy>=4.0.0->pysyd) (1.7.2)
Requirement already satisfied: cycler>=0.10 in /opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/p ython3.8/site-packages (from matplotlib>=1.5.3->pysyd) (0.10.0)
Requirement already satisfied: kiwisolver>=1.0.1 in /opt/local/Library/Frameworks/Python.framework/Versions/3.8/ lib/python3.8/site-packages (from matplotlib>=1.5.3->pysyd) (1.3.1)
Requirement already satisfied: pillow>=6.2.0 in /opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/ python3.8/site-packages (from matplotlib>=1.5.3->pysyd) (8.3.1)
Requirement already satisfied: pyparsing>=2.2.1 in /opt/local/Library/Frameworks/Python.framework/Versions/3.8/l ib/python3.8/site-packages (from matplotlib>=1.5.3->pysyd) (2.4.7)
Requirement already satisfied: python-dateutil>=2.7 in /opt/local/Library/Frameworks/Python.framework/Versions/3 .8/lib/python3.8/site-packages (from matplotlib>=1.5.3->pysyd) (2.8.2)
Requirement already satisfied: six in /opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/ site-packages (from cycler>=0.10->matplotlib>=1.5.3->pysyd) (1.16.0)
Requirement already satisfied: pytz>=2017.3 in /opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/p ython3.8/site-packages (from pandas>=1.0.5->pysyd) (2021.1)
WARNING: Value for scheme.headers does not match. Please report this to <https://github.com/pypa/pip/issues/1015 1>
distutils: /Users/cosmicbabs/Library/Python/3.8/include/python3.8/UNKNOWN
sysconfig: /Users/cosmicbabs/Library/Python/3.8/include/UNKNOWN
WARNING: Additional context: user = True home = None root = None prefix = None

This is coming from a CI build of a Dockerfile outside of my control, so running pip debug may be tricky.

#8 1.213 Collecting pip
#8 1.241   Downloading pip-21.2.1-py3-none-any.whl (1.6 MB)
#8 1.566 Installing collected packages: pip
#8 1.566   Attempting uninstall: pip
#8 1.567     Found existing installation: pip 20.2.4
#8 1.753     Uninstalling pip-20.2.4:
#8 2.052       Successfully uninstalled pip-20.2.4
#8 3.294 Successfully installed pip-21.2.1
#8 4.285 WARNING: Value for scheme.platlib does not match. Please report this to <https://github.com/pypa/pip/issues/10151>
#8 4.285 distutils: /usr/local/lib/python3.6/dist-packages
#8 4.285 sysconfig: /usr/lib/python3.6/site-packages
#8 4.285 WARNING: Value for scheme.purelib does not match. Please report this to <https://github.com/pypa/pip/issues/10151>
#8 4.285 distutils: /usr/local/lib/python3.6/dist-packages
#8 4.285 sysconfig: /usr/lib/python3.6/site-packages
#8 4.286 WARNING: Value for scheme.headers does not match. Please report this to <https://github.com/pypa/pip/issues/10151>
#8 4.286 distutils: /usr/local/include/python3.6/UNKNOWN
#8 4.286 sysconfig: /usr/include/python3.6m/UNKNOWN
#8 4.286 WARNING: Value for scheme.scripts does not match. Please report this to <https://github.com/pypa/pip/issues/10151>
#8 4.286 distutils: /usr/local/bin
#8 4.286 sysconfig: /usr/bin
#8 4.286 WARNING: Value for scheme.data does not match. Please report this to <https://github.com/pypa/pip/issues/10151>
#8 4.286 distutils: /usr/local
#8 4.286 sysconfig: /usr
#8 4.286 WARNING: Additional context:
#8 4.286 user = False
#8 4.286 home = None
#8 4.286 root = None
#8 4.286 prefix = None

@uranusjr Edited adding the warning message I get, seems to be the same no matter what I try to install. This is just a pip update attempt

giacomo@giacomo-XPS-15-7590:~$ python3 -m pip install --upgrade pip
WARNING: Value for scheme.platlib does not match. Please report this to <https://github.com/pypa/pip/issues/10151>
distutils: /usr/local/lib/python3.8/dist-packages
sysconfig: /usr/lib/python3.8/site-packages
WARNING: Value for scheme.purelib does not match. Please report this to <https://github.com/pypa/pip/issues/10151>
distutils: /usr/local/lib/python3.8/dist-packages
sysconfig: /usr/lib/python3.8/site-packages
WARNING: Value for scheme.headers does not match. Please report this to <https://github.com/pypa/pip/issues/10151>
distutils: /usr/local/include/python3.8/UNKNOWN
sysconfig: /usr/include/python3.8/UNKNOWN
WARNING: Value for scheme.scripts does not match. Please report this to <https://github.com/pypa/pip/issues/10151>
distutils: /usr/local/bin
sysconfig: /usr/bin
WARNING: Value for scheme.data does not match. Please report this to <https://github.com/pypa/pip/issues/10151>
distutils: /usr/local
sysconfig: /usr
WARNING: Additional context:
user = False
home = None
root = None
prefix = None

pip debug output on Ubuntu 20.04.2

WARNING: This command is only meant for debugging. Do not use this with automation for parsing and getting these details, since the output and options of this command may change without notice.
pip version: pip 21.2.1 from /usr/local/lib/python3.8/dist-packages/pip (python 3.8)
sys.version: 3.8.10 (default, Jun  2 2021, 10:49:15) 
[GCC 9.4.0]
sys.executable: /usr/bin/python3
sys.getdefaultencoding: utf-8
sys.getfilesystemencoding: utf-8
locale.getpreferredencoding: UTF-8
sys.platform: linux
sys.implementation:
  name: cpython
'cert' config value: global
REQUESTS_CA_BUNDLE: None
CURL_CA_BUNDLE: None
pip._vendor.certifi.where(): /usr/local/lib/python3.8/dist-packages/pip/_vendor/certifi/cacert.pem
pip._vendor.DEBUNDLED: False
vendored library versions:
  appdirs==1.4.4
  CacheControl==0.12.6
  colorama==0.4.4
  distlib==0.3.2
  distro==1.5.0 (Unable to locate actual module version, using vendor.txt specified version)
  html5lib==1.1
  msgpack==1.0.2 (Unable to locate actual module version, using vendor.txt specified version)
  packaging==21.0
  pep517==0.11.0
  progress==1.5
  pyparsing==2.4.7
  requests==2.26.0
  certifi==2021.05.30
  chardet==4.0.0
  idna==3.2
  urllib3==1.26.6
  resolvelib==0.7.1
  setuptools==44.0.0 (Unable to locate actual module version, using vendor.txt specified version)
  six==1.16.0
  tenacity==8.0.1 (Unable to locate actual module version, using vendor.txt specified version)
  tomli==1.0.3
  webencodings==0.5.1 (Unable to locate actual module version, using vendor.txt specified version)
Compatible tags: 600
  cp38-cp38-manylinux_2_31_x86_64
  cp38-cp38-manylinux_2_30_x86_64
  cp38-cp38-manylinux_2_29_x86_64
  cp38-cp38-manylinux_2_28_x86_64
  cp38-cp38-manylinux_2_27_x86_64
  cp38-cp38-manylinux_2_26_x86_64
  cp38-cp38-manylinux_2_25_x86_64
  cp38-cp38-manylinux_2_24_x86_64
  cp38-cp38-manylinux_2_23_x86_64
  cp38-cp38-manylinux_2_22_x86_64
  ...
  [First 10 tags shown. Pass --verbose to show all.]

@DarrienG Rocky Linux is the community version of new RHEL similar to CentOS 7 was to old RHEL versions, right? I’m trying to get an idea where to categories it under.

@uranusjr edited now, sorry.

@uranusjr sorry about that, edited.

@uranusjr Yes, correct: sudo port install python39

MacPorts (per default setting) keeps everything separated in /opt/local/ and not mix it in /usr/local/ to avoid conflicts with other installed packages.

So you probably made a typo.

@uranusjr,

Nope, forgot the obligatory export in my .bashrc. 😃 doh!

When I tested the _PIP_LOCATIONS_NO_WARN_ON_MISMATCH=0 value, it was in the shell itself and not (exported) in .bashrc. Sorry for the noise.

@allenatdecisiv Any non-empty value of _PIP_LOCATIONS_NO_WARN_ON_MISMATCH, including both 0, and 1, should do exactly the same:

https://github.com/pypa/pip/blob/a196b3bf013a63f348e175e0e871f51f170f8abb/src/pip/_internal/locations/__init__.py#L38-L41

So you probably made a typo.

@rupanshu1710 @ayusha98 Please read the first post and follow the template to provide information about your platform.

Updated.