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

Kill location warning on Debian and Red Hat system Python #10217

Merged
merged 2 commits into from
Jul 29, 2021

Conversation

uranusjr
Copy link
Member

This accounts for the sudo pip install (for both Red Hat and Debian patches) and pymalloc parts of #10208.

@uranusjr
Copy link
Member Author

uranusjr commented Jul 27, 2021

Pinging people reported this in #10151 for testing. Use this to install pip from this PR:

pip install https://github.com/pypa/pip/archive/refs/heads/main.zip

@allenatdecisiv @aminvakil @arderyp @ben @Camilochiang @etschgi1 @jabberwock @jolaf @maxbrand99 @Molkree @mpinhede @nyuszika7h @OndroV @rickhg12hs @satanb4 @sbranchaw @SebNik1 @solarchemist @sylph520 @takos @takos22 @tothedistance @Vistaus @whatzgnu @wilwet

@aminvakil
Copy link

aminvakil commented Jul 27, 2021

Thanks, warning is not present anymore.

More info on aminvakil/docker-ansible#3.

@uranusjr

This comment has been minimized.

@aminvakil

This comment has been minimized.

@Camilochiang
Copy link

The warning persist in ubuntu. i.e:

ubuntu@ubuntu:~$ python3 -m pip install tensorflow
WARNING: Value for scheme.platlib does not match. Please report this to <https://github.com/pypa/pip/issues/10151>
distutils: /usr/local/lib/python3.6/dist-packages
sysconfig: /usr/lib/python3.6/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.6/dist-packages
sysconfig: /usr/lib/python3.6/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.6/UNKNOWN
sysconfig: /usr/include/python3.6m/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
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: tensorflow in ./.local/lib/python3.6/site-packages (2.5.0)
Requirement already satisfied: absl-py~=0.10 in ./.local/lib/python3.6/site-packages (from tensorflow) (0.13.0)
Requirement already satisfied: h5py~=3.1.0 in ./.local/lib/python3.6/site-packages (from tensorflow) (3.1.0)
Requirement already satisfied: gast==0.4.0 in ./.local/lib/python3.6/site-packages (from tensorflow) (0.4.0)
Requirement already satisfied: six~=1.15.0 in ./.local/lib/python3.6/site-packages (from tensorflow) (1.15.0)
Requirement already satisfied: numpy~=1.19.2 in ./.local/lib/python3.6/site-packages (from tensorflow) (1.19.5)
Requirement already satisfied: termcolor~=1.1.0 in ./.local/lib/python3.6/site-packages (from tensorflow) (1.1.0)
Requirement already satisfied: wheel~=0.35 in ./.local/lib/python3.6/site-packages (from tensorflow) (0.36.2)
Requirement already satisfied: grpcio~=1.34.0 in ./.local/lib/python3.6/site-packages (from tensorflow) (1.34.1)
Requirement already satisfied: protobuf>=3.9.2 in ./.local/lib/python3.6/site-packages (from tensorflow) (3.17.3)
Requirement already satisfied: opt-einsum~=3.3.0 in ./.local/lib/python3.6/site-packages (from tensorflow) (3.3.0)
Requirement already satisfied: keras-nightly~=2.5.0.dev in ./.local/lib/python3.6/site-packages (from tensorflow) (2.5.0.dev2021032900)
Requirement already satisfied: tensorflow-estimator<2.6.0,>=2.5.0rc0 in ./.local/lib/python3.6/site-packages (from tensorflow) (2.5.0)
Requirement already satisfied: google-pasta~=0.2 in ./.local/lib/python3.6/site-packages (from tensorflow) (0.2.0)
Requirement already satisfied: keras-preprocessing~=1.1.2 in ./.local/lib/python3.6/site-packages (from tensorflow) (1.1.2)
Requirement already satisfied: tensorboard~=2.5 in ./.local/lib/python3.6/site-packages (from tensorflow) (2.5.0)
Requirement already satisfied: flatbuffers~=1.12.0 in ./.local/lib/python3.6/site-packages (from tensorflow) (1.12)
Requirement already satisfied: wrapt~=1.12.1 in ./.local/lib/python3.6/site-packages (from tensorflow) (1.12.1)
Requirement already satisfied: typing-extensions~=3.7.4 in ./.local/lib/python3.6/site-packages (from tensorflow) (3.7.4.3)
Requirement already satisfied: astunparse~=1.6.3 in ./.local/lib/python3.6/site-packages (from tensorflow) (1.6.3)
Requirement already satisfied: cached-property in ./.local/lib/python3.6/site-packages (from h5py~=3.1.0->tensorflow) (1.5.2)
Requirement already satisfied: tensorboard-plugin-wit>=1.6.0 in ./.local/lib/python3.6/site-packages (from tensorboard~=2.5->tensorflow) (1.8.0)
Requirement already satisfied: google-auth-oauthlib<0.5,>=0.4.1 in ./.local/lib/python3.6/site-packages (from tensorboard~=2.5->tensorflow) (0.4.4)
Requirement already satisfied: tensorboard-data-server<0.7.0,>=0.6.0 in ./.local/lib/python3.6/site-packages (from tensorboard~=2.5->tensorflow) (0.6.1)
Requirement already satisfied: requests<3,>=2.21.0 in ./.local/lib/python3.6/site-packages (from tensorboard~=2.5->tensorflow) (2.26.0)
Requirement already satisfied: werkzeug>=0.11.15 in ./.local/lib/python3.6/site-packages (from tensorboard~=2.5->tensorflow) (2.0.1)
Requirement already satisfied: google-auth<2,>=1.6.3 in ./.local/lib/python3.6/site-packages (from tensorboard~=2.5->tensorflow) (1.33.1)
Requirement already satisfied: setuptools>=41.0.0 in ./.local/lib/python3.6/site-packages (from tensorboard~=2.5->tensorflow) (57.4.0)
Requirement already satisfied: markdown>=2.6.8 in ./.local/lib/python3.6/site-packages (from tensorboard~=2.5->tensorflow) (3.3.4)
Requirement already satisfied: pyasn1-modules>=0.2.1 in ./.local/lib/python3.6/site-packages (from google-auth<2,>=1.6.3->tensorboard~=2.5->tensorflow) (0.2.8)
Requirement already satisfied: cachetools<5.0,>=2.0.0 in ./.local/lib/python3.6/site-packages (from google-auth<2,>=1.6.3->tensorboard~=2.5->tensorflow) (4.2.2)
Requirement already satisfied: rsa<5,>=3.1.4 in ./.local/lib/python3.6/site-packages (from google-auth<2,>=1.6.3->tensorboard~=2.5->tensorflow) (4.7.2)
Requirement already satisfied: requests-oauthlib>=0.7.0 in ./.local/lib/python3.6/site-packages (from google-auth-oauthlib<0.5,>=0.4.1->tensorboard~=2.5->tensorflow) (1.3.0)
Requirement already satisfied: importlib-metadata in ./.local/lib/python3.6/site-packages (from markdown>=2.6.8->tensorboard~=2.5->tensorflow) (4.6.1)
Requirement already satisfied: pyasn1<0.5.0,>=0.4.6 in ./.local/lib/python3.6/site-packages (from pyasn1-modules>=0.2.1->google-auth<2,>=1.6.3->tensorboard~=2.5->tensorflow) (0.4.8)
Requirement already satisfied: idna<4,>=2.5 in ./.local/lib/python3.6/site-packages (from requests<3,>=2.21.0->tensorboard~=2.5->tensorflow) (2.10)
Requirement already satisfied: certifi>=2017.4.17 in ./.local/lib/python3.6/site-packages (from requests<3,>=2.21.0->tensorboard~=2.5->tensorflow) (2021.5.30)
Requirement already satisfied: charset-normalizer~=2.0.0 in ./.local/lib/python3.6/site-packages (from requests<3,>=2.21.0->tensorboard~=2.5->tensorflow) (2.0.3)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in ./.local/lib/python3.6/site-packages (from requests<3,>=2.21.0->tensorboard~=2.5->tensorflow) (1.26.6)
Requirement already satisfied: oauthlib>=3.0.0 in ./.local/lib/python3.6/site-packages (from requests-oauthlib>=0.7.0->google-auth-oauthlib<0.5,>=0.4.1->tensorboard~=2.5->tensorflow) (3.1.1)
Requirement already satisfied: dataclasses in ./.local/lib/python3.6/site-packages (from werkzeug>=0.11.15->tensorboard~=2.5->tensorflow) (0.8)
Requirement already satisfied: zipp>=0.5 in ./.local/lib/python3.6/site-packages (from importlib-metadata->markdown>=2.6.8->tensorboard~=2.5->tensorflow) (3.5.0)
WARNING: Value for scheme.headers does not match. Please report this to <https://github.com/pypa/pip/issues/10151>
distutils: /home/ubuntu/.local/include/python3.6m/UNKNOWN
sysconfig: /home/ubuntu/.local/include/python3.6/UNKNOWN
WARNING: Additional context:
user = True
home = None
root = None
prefix = None

@uranusjr
Copy link
Member Author

@Camilochiang What Ubuntu version are you on?

@Molkree
Copy link
Contributor

Molkree commented Jul 27, 2021

This is in Google Colab. After installing the patch I no longer see any warnings when doing !python -m pip install -U setuptools wheel but I do get some when doing !python -m pip install obspy:

Warnings
  WARNING: Value for purelib does not match. Please report this to <https://github.com/pypa/pip/issues/10151>
  distutils: /usr/lib/python3/dist-packages
  sysconfig: /usr/lib/python3.7/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/lib/python3/dist-packages
  sysconfig: /usr/lib/python3.7/site-packages

Link to Colab.

@uranusjr
Copy link
Member Author

  WARNING: Value for purelib does not match. Please report this to <https://github.com/pypa/pip/issues/10151>
  distutils: /usr/lib/python3/dist-packages
  sysconfig: /usr/lib/python3.7/site-packages

Hmmm, Google Collab (or whatever OS they are running underneath) is doing something no-one else is doing. Thanks for reporting, I’ll definitely need to investigate this!

@uranusjr
Copy link
Member Author

uranusjr commented Jul 27, 2021

Oh no. The good news is, Google Colab is just using a standard Ubuntu 18.04 with system Python (it fucking shouldn’t do this, but I guess we can’t change Google). But this makes the bug even more confusing. distutils: /usr/lib/python3/dist-packages means you’re running in deb_system mode, which is a special scheme Debian uses to install Debian packages, that a user should never access without elaborated hacks, since installing into it can potentially put your entire system in an unrecoverable state).

And the things is, I couldn’t access it! I added a new code block in your Colab file, and the installation did not print any warnings.

image

This is all so confusing and I think I’m going to just suppress the warning in this situation. Whatever was broken enouigh that put you in the deb_system scheme is probably out of pip’s control, and Debian will need to come up with a solution for that when they switch to sysconfig anyway.

@allenatdecisiv
Copy link

allenatdecisiv commented Jul 27, 2021

@uranusjr,

I did the pip install but it puts stuff in the non-system-packaged area of /usr/local. When I update my pip, I rebuild/update Cygwin's source packages and I have my own Cygwin package repository to install them from. My Cygwin package pip is /usr/bin/pip. I also use the alternatives system because Cygwin can run Python 2 and Python 3 (but I don't do this). I think Cygwin can have multiple Python 3s installed (I don't do this either).

This test was done in my "main" pip environment (not a venv).

$ pip --version
pip 21.3.dev0 from /usr/local/lib/python3.8/site-packages/pip (python 3.8)

# confirm active PIP knobs
$ set | grep ^PIP_
PIP_FORMAT=columns
PIP_NO_COLOR=true

# pick an easy package to test with
$ pip show platformdirs
Name: platformdirs
Version: 2.1.0
Summary: A small Python module for determining appropriate platform-specific dirs, e.g. a "user data dir".
Home-page: https://github.com/platformdirs/platformdirs
Author:
Author-email:
License: MIT
Location: /usr/local/lib/python3.8/site-packages
Requires:
Required-by: virtualenv

# uninstall it to re-install it for testing
$ pip uninstall platformdirs
Found existing installation: platformdirs 2.1.0
Uninstalling platformdirs-2.1.0:
  Would remove:
    /usr/local/lib/python3.8/site-packages/platformdirs-2.1.0.dist-info/*
    /usr/local/lib/python3.8/site-packages/platformdirs/*
Proceed (Y/n)? y
  Successfully uninstalled platformdirs-2.1.0

# re-install it
$ pip install platformdirs
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/site-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/site-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
Collecting platformdirs
  Using cached platformdirs-2.1.0-py3-none-any.whl (13 kB)
Installing collected packages: platformdirs
  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/platformdirs
  sysconfig: /usr/include/python3.8/platformdirs
Successfully installed platformdirs-2.1.0

@Camilochiang
Copy link

@Camilochiang What Ubuntu version are you on?

No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.5 LTS
Release: 18.04
Codename: bionic

I may say that I´m running in a Ubuntu LTS (Server) + Gnome environment. That could be your problem maybe due the differences between the desktop and server setups/settings?

@uranusjr
Copy link
Member Author

@allenatdecisiv It seems like Cygwin is doing something not covered by this PR. What is the package that provides you Python 3 in Cygwin, is it python3 or python38?

@Camilochiang I don’t think so, afaik Ubuntu server uses the same Python as desktop. Could you run python3 -m pip --version to make sure you’re on the correct pip version?

@allenatdecisiv
Copy link

allenatdecisiv commented Jul 28, 2021

@uranusjr,

It's python38. python3 is a meta-package for handling setting the "Python default version".

The Cygwin Official Python 3.8 is 3.8.10. I've updated the packaging to 3.8.11 for my personal use. I've uploaded it here: https://github.com/allenatdecisiv/python38-3.8.11-1.src for you to peruse. When I upgrade packages for my personal use, I vet the patches and/or rebase (or drop/add) them as needed. I can go back to the official Python 3.8.10 but I doubt it will produce different results. The delta from 3.8.10 to 3.8.11 wasn't a big deal.

Generally speaking, Cygwin contributors/team folks use (or follow) what Fedora does patches-wise (and packaging to some degree). It depends on the package maintainer, but some packages have submodules to the official Fedora code repositories.

I would have guessed anything you do for Fedora would have worked on Cygwin.

EDIT: here's the python3 meta-package: https://github.com/allenatdecisiv/python3-3.8.11-1.src

@uranusjr
Copy link
Member Author

uranusjr commented Jul 28, 2021

@allenatdecisiv Oh awesome, thank you! I was wondering where I can find the patches Cygwin is using. (I was going to run diff on the patched Python package if I couldn’t find them…)

It seems like this is the patch that causes the location difference:

https://github.com/allenatdecisiv/python38-3.8.11-1.src/blob/81fc967c8829cf75763dd5979a81bffc2a3d570f/00251-change-user-install-location.patch

It indeed seems very similar to Red Hat’s patches, but is unfortunately lacking some of its characteristics of Red Hat’s current Python distrubution, so the current detection logic is not working for Cygwin. We might need to be inventive here. Do you know by chance if there is a way to detect whether the currently running Python is distributed (and thus patched by) Cygwin? Note that we want to only detect a patched distribution—a Python compiled from source in Cygwin should not be included, which is the difficult part.

@uranusjr
Copy link
Member Author

Oh I think I have an idea. We can call addsitepackages() twice, once with RPM_BUILD_ROOT set and once without, and see if different results come out. That’s probably more reliable than our current detection logic for RH as well.

@Camilochiang
Copy link

@allenatdecisiv It seems like Cygwin is doing something not covered by this PR. What is the package that provides you Python 3 in Cygwin, is it python3 or python38?

@Camilochiang I don’t think so, afaik Ubuntu server uses the same Python as desktop. Could you run python3 -m pip --version to make sure you’re on the correct pip version?

’’’
python3 -m pip --version
pip 21.2.1 from /home/ubuntu/.local/lib/python3.6/site-packages/pip (python 3.6)
’’’

@uranusjr
Copy link
Member Author

It seems like you are not running the proposed patch in this PR. Please follow the instructions to get the in-development pip version #10217 (comment)

@uranusjr
Copy link
Member Author

Pinging more people for testing. Please follow instructions in this comment: #10217 (comment)

2021-07-27 14:12:00+0800: @DarrienG

2021-07-28 08:56:00+0800: @zemzale @benz0li @szmoore @machinexa2 @luboslives @EpicFail1403 @Skinbow @c0rt @jwilts @mauvilsa @nbhanji @RhFortuna

@benz0li
Copy link

benz0li commented Jul 28, 2021

@uranusjr No more warnings when installing pylint after applying pip install https://github.com/uranusjr/pip/archive/refs/heads/locations-linux-system.zip

@Camilochiang
Copy link

It seems like you are not running the proposed patch in this PR. Please follow the instructions to get the in-development pip version #10217 (comment)

My apologies! Now is working ;) the warning is gone. Thanks!

@DarrienG
Copy link

Confirming this handled the issue for me.

1 similar comment
@zemzale
Copy link

zemzale commented Jul 29, 2021

Confirming this handled the issue for me.

@c0rt
Copy link

c0rt commented Jul 29, 2021

@uranusjr No more warnings when executing pip install --upgrade conan after applying pip install https://github.com/uranusjr/pip/archive/refs/heads/locations-linux-system.zip

@uranusjr
Copy link
Member Author

Alright! Merging this since it seems to work for everyone. @Molkree @allenatdecisiv I’ll handle Google Colab and Cygwin in a separate PR.

@uranusjr uranusjr merged commit 310c9ad into pypa:main Jul 29, 2021
@uranusjr uranusjr deleted the locations-linux-system branch July 29, 2021 06:35
@allenatdecisiv
Copy link

allenatdecisiv commented Jul 29, 2021

@uranusjr,

Apologies for checking out.

If there are Red Hat'isms missing in Cygwin's patch set, I could bring this up on the mailing list and see if the Cygwin maintainer could include them. But if those gaps are so specific to Red Hat Linux/Linux, that might be an issue.

How about the distutils patch?
https://github.com/allenatdecisiv/python38-3.8.11-1.src/blob/main/3.8-distutils-cygwin.patch

@uranusjr
Copy link
Member Author

uranusjr commented Jul 30, 2021

I don’t think there’s anything “missing” per se; what Red Hat has but Cygwin does not (and we are relying right now) is Red Hat has a later patch replacing lib with lib64. But if Cygwin needs to support 32-bit CPUs I can understand it not doing that. I will try out my alternative method mentioned in the above comment (#10217 (comment)); if that works, Cygwin won’t need to change anything.

The other distutils patch you mentioned above is unconsequential to the location warning; it is only used for compilation, which pip does not do (it’s delegated to setuptools).

@uranusjr
Copy link
Member Author

uranusjr commented Jul 30, 2021

Pinging people reported this in #10151 for testing. Use this to install pip from this PR and see if the issue went away:

pip install https://github.com/pypa/pip/archive/refs/heads/main.zip

2021-07-30 09:17:00+0800 @TsichiChang @TiagoJeSilvla @whimshot @siddhpant @daira @iago-pssjd @kalibyrn @sfjuocekr @ProfessorVarox @DU-ds @robert-shade @ashemedai @Julien-athstat @montarion @acpguedes @cheginit @aprotyas @jackwhelpton @Willemgtn @neg2led @MichaIng @puppywang @OneRain233 @paulathomas @KanTakahiro @autquis @filwaitman @gregersn @pdxjohnny @klint-k

@cheginit
Copy link

@uranusjr The link doesn't work.

@uranusjr
Copy link
Member Author

Oops sorry, should be fixed now.

@KanTakahiro
Copy link

I have installed pip from https://github.com/pypa/pip/archive/refs/heads/main.zip and the version of pip3 is 21.3.dev0 before I commented in #10151 (comment). Is this version correct? But as the output showed in my comment, the WARNING message still there.

@cheginit
Copy link

I just tested it with the updated link and am not getting the warning message anymore!

@uranusjr
Copy link
Member Author

Thanks for the feedback @KanTakahiro, I will add this to my notes and try to address it in another PR. Would it be able for you to edit your original comment in #10151 to describe how the situation can be reproduced from scratch, so I can (for example) start a Docker container to investigate?

@KanTakahiro
Copy link

@uranusjr Thank you for your reply. I have edited my original comment #10151 (comment) and added a list of what I did. I wish it can help you.

@aprotyas
Copy link

Issue is resolved with the new patch. Thanks!

@allenatdecisiv
Copy link

I don’t think there’s anything “missing” per se; what Red Hat has but Cygwin does not (and we are relying right now) is Red Hat has a later patch replacing lib with lib64. But if Cygwin needs to support 32-bit CPUs I can understand it not doing that. I will try out my alternative method mentioned in the above comment (#10217 (comment)); if that works, Cygwin won’t need to change anything.

@uranusjr,

Ah, and yes, AFAIK, Cygwin is still available for/on 32-bit CPUs (with a caveat emptor).

@neggles
Copy link

neggles commented Jul 30, 2021

Can confirm this resolves the issue on my system :)

@siddhpant
Copy link

Pinging people reported this in #10151 for testing. Use this to install pip from this PR:

pip install https://github.com/pypa/pip/archive/refs/heads/main.zip
Output before updating:
$ pip install

WARNING: Value for scheme.platlib does not match. Please report this to <https://github.com/pypa/pip/issues/10151>
distutils: /usr/local/lib/python3.9/dist-packages
sysconfig: /usr/lib/python3.9/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.9/dist-packages
sysconfig: /usr/lib/python3.9/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.9/UNKNOWN
sysconfig: /usr/include/python3.9/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
Defaulting to user installation because normal site-packages is not writeable
ERROR: You must give at least one requirement to install (see "pip help install")
Output while updating:
$ pip install https://github.com/pypa/pip/archive/refs/heads/main.zip

WARNING: Value for scheme.platlib does not match. Please report this to <https://github.com/pypa/pip/issues/10151>
distutils: /usr/local/lib/python3.9/dist-packages
sysconfig: /usr/lib/python3.9/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.9/dist-packages
sysconfig: /usr/lib/python3.9/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.9/UNKNOWN
sysconfig: /usr/include/python3.9/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
Defaulting to user installation because normal site-packages is not writeable
Collecting https://github.com/pypa/pip/archive/refs/heads/main.zip
  Downloading https://github.com/pypa/pip/archive/refs/heads/main.zip
     / 9.1 MB 5.7 MB/s
  WARNING: Value for purelib does not match. Please report this to <https://github.com/pypa/pip/issues/10151>
  distutils: /usr/lib/python3/dist-packages
  sysconfig: /usr/lib/python3.9/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/lib/python3/dist-packages
  sysconfig: /usr/lib/python3.9/site-packages
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Building wheels for collected packages: pip
  Building wheel for pip (PEP 517) ... done
  Created wheel for pip: filename=pip-21.3.dev0-py3-none-any.whl size=1552436 sha256=65fe263fc1fa7c5cc6b34b4820fc253958d37b7215cbd26a26680663ad118795
  Stored in directory: /tmp/pip-ephem-wheel-cache-ign8j53n/wheels/44/e2/33/b5d54c05a8ad99512602104eb5efead6437e2b580838890b1c
Successfully built pip
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 21.2.1
    Uninstalling pip-21.2.1:
      Successfully uninstalled pip-21.2.1
Successfully installed pip-21.3.dev0
Output after updating:
$ pip install
Defaulting to user installation because normal site-packages is not writeable
ERROR: You must give at least one requirement to install (see "pip help install")
$ pip install pythonfinder

Defaulting to user installation because normal site-packages is not writeable
Collecting pythonfinder
  Downloading pythonfinder-1.2.8-py2.py3-none-any.whl (39 kB)
Collecting cached-property
  Downloading cached_property-1.5.2-py2.py3-none-any.whl (7.6 kB)
Requirement already satisfied: packaging in ./.local/lib/python3.9/site-packages (from pythonfinder) (21.0)
Requirement already satisfied: six in ./.local/lib/python3.9/site-packages (from pythonfinder) (1.16.0)
Requirement already satisfied: attrs in ./.local/lib/python3.9/site-packages (from pythonfinder) (21.2.0)
Requirement already satisfied: click in ./.local/lib/python3.9/site-packages (from pythonfinder) (8.0.1)
Requirement already satisfied: pyparsing>=2.0.2 in ./.local/lib/python3.9/site-packages (from packaging->pythonfinder) (2.4.7)
Installing collected packages: cached-property, pythonfinder
Successfully installed cached-property-1.5.2 pythonfinder-1.2.8

@uranusjr Issue is resolved on my system. Thanks!

@MichaIng
Copy link

Issue solved here as well on Debian Bullseye 👍.

@daira
Copy link

daira commented Jul 30, 2021

Works for me, thankyou.

@ashemedai
Copy link

FWIW, it seems to resolve the WSL2 / Debian 10.10 issue.

@johnandersen777
Copy link

Still present for me

$ cat /usr/lib/os-release
NAME="Ubuntu"
VERSION="18.04.5 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.5 LTS"
VERSION_ID="18.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=bionic
UBUNTU_CODENAME=bionic
$ 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.dev0 from /home/johnsa1/.local/lib/python3.7/site-packages/pip (python 3.7)
sys.version: 3.7.5 (default, Feb 23 2021, 13:22:40)
[GCC 8.4.0]
sys.executable: /usr/bin/python3.7
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: /etc/ssl/certs/ca-certificates.crt
CURL_CA_BUNDLE: None
pip._vendor.certifi.where(): /home/johnsa1/.local/lib/python3.7/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: 469
  cp37-cp37m-manylinux_2_27_x86_64
  cp37-cp37m-manylinux_2_26_x86_64
  cp37-cp37m-manylinux_2_25_x86_64
  cp37-cp37m-manylinux_2_24_x86_64
  cp37-cp37m-manylinux_2_23_x86_64
  cp37-cp37m-manylinux_2_22_x86_64
  cp37-cp37m-manylinux_2_21_x86_64
  cp37-cp37m-manylinux_2_20_x86_64
  cp37-cp37m-manylinux_2_19_x86_64
  cp37-cp37m-manylinux_2_18_x86_64
  ...
  [First 10 tags shown. Pass --verbose to show all.]
$ pip install https://github.com/pypa/pip/archive/refs/heads/main.zip --no-cache --force-reinstall
Defaulting to user installation because normal site-packages is not writeable
Collecting https://github.com/pypa/pip/archive/refs/heads/main.zip
  Downloading https://github.com/pypa/pip/archive/refs/heads/main.zip
     / 9.1 MB 3.3 MB/s
  WARNING: Value for purelib does not match. Please report this to <https://github.com/pypa/pip/issues/10151>
  distutils: /usr/lib/python3/dist-packages
  sysconfig: /usr/lib/python3.7/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/lib/python3/dist-packages
  sysconfig: /usr/lib/python3.7/site-packages
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Building wheels for collected packages: pip
  Building wheel for pip (PEP 517) ... done
  Created wheel for pip: filename=pip-21.3.dev0-py3-none-any.whl size=1553940 sha256=f95381030a9b61089cf02320912f8035610101632bc7d9e095af183b433fb562
  Stored in directory: /tmp/pip-ephem-wheel-cache-t2bw7dsb/wheels/e4/d6/4d/ed8ac1a4f9bf3b1ef4c5ab9d5fc93b3f8cf57b8ee256115a4a
Successfully built pip
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 21.3.dev0
    Uninstalling pip-21.3.dev0:
      Successfully uninstalled pip-21.3.dev0
Successfully installed pip-21.3.dev0
$ pip install https://github.com/pypa/pip/archive/refs/heads/main.zip --no-cache --force-reinstall
Defaulting to user installation because normal site-packages is not writeable
Collecting https://github.com/pypa/pip/archive/refs/heads/main.zip
  Downloading https://github.com/pypa/pip/archive/refs/heads/main.zip
     - 9.1 MB 3.7 MB/s
  WARNING: Value for purelib does not match. Please report this to <https://github.com/pypa/pip/issues/10151>
  distutils: /usr/lib/python3/dist-packages
  sysconfig: /usr/lib/python3.7/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/lib/python3/dist-packages
  sysconfig: /usr/lib/python3.7/site-packages
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Building wheels for collected packages: pip
  Building wheel for pip (PEP 517) ... done
  Created wheel for pip: filename=pip-21.3.dev0-py3-none-any.whl size=1553940 sha256=46f6a99becd9fbd0e0911c698f501c595982127b92332db2eb8cb51fa0b4aacb
  Stored in directory: /tmp/pip-ephem-wheel-cache-nfyexioo/wheels/e4/d6/4d/ed8ac1a4f9bf3b1ef4c5ab9d5fc93b3f8cf57b8ee256115a4a
Successfully built pip
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 21.3.dev0
    Uninstalling pip-21.3.dev0:
      Successfully uninstalled pip-21.3.dev0
Successfully installed pip-21.3.dev0

@Molkree
Copy link
Contributor

Molkree commented Jul 31, 2021

@pdxjohnny, this looks the same thing I got on Colab #10217 (comment) #10217 (comment)
And @uranusjr said he will handle it in a separate PR #10217 (comment)
It's interesting you got it NOT on Colab though so maybe it is more common (if it is the same issue).

@uranusjr
Copy link
Member Author

uranusjr commented Aug 1, 2021

Yes, and we’ve got another report on this #10151 (comment)

I investigated this a bit and this seems to be consistently reproducible when building things from source (#10151 (comment)), so that’s a lead. I plan to open a new issue to hold the investigation.

Edit: PR filed, see link below.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.