-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Conversation
Pinging people reported this in #10151 for testing. Use this to install pip from this PR:
@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 |
Thanks, warning is not present anymore. More info on aminvakil/docker-ansible#3. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
The warning persist in ubuntu. i.e:
|
@Camilochiang What Ubuntu version are you on? |
This is in Google Colab. After installing the patch I no longer see any warnings when doing Warnings
|
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! |
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. 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. 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 |
I did the This test was done in my "main" pip environment (not a venv).
|
No LSB modules are available. 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? |
@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 @Camilochiang I don’t think so, afaik Ubuntu server uses the same Python as desktop. Could you run |
It's 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 |
@allenatdecisiv Oh awesome, thank you! I was wondering where I can find the patches Cygwin is using. (I was going to run It seems like this is the patch that causes the location difference: 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. |
Oh I think I have an idea. We can call |
’’’ |
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) |
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 |
@uranusjr No more warnings when installing |
My apologies! Now is working ;) the warning is gone. Thanks! |
Confirming this handled the issue for me. |
1 similar comment
Confirming this handled the issue for me. |
@uranusjr No more warnings when executing |
Alright! Merging this since it seems to work for everyone. @Molkree @allenatdecisiv I’ll handle Google Colab and Cygwin in a separate PR. |
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 |
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 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). |
Pinging people reported this in #10151 for testing. Use this to install pip from this PR and see if the issue went away:
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 |
@uranusjr The link doesn't work. |
Oops sorry, should be fixed now. |
I have installed pip from |
I just tested it with the updated link and am not getting the warning message anymore! |
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? |
@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. |
Issue is resolved with the new patch. Thanks! |
Ah, and yes, AFAIK, Cygwin is still available for/on 32-bit CPUs (with a caveat emptor). |
Can confirm this resolves the issue on my system :) |
Output before updating:
Output while updating:
Output after updating:
@uranusjr Issue is resolved on my system. Thanks! |
Issue solved here as well on Debian Bullseye 👍. |
Works for me, thankyou. |
FWIW, it seems to resolve the WSL2 / Debian 10.10 issue. |
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 |
@pdxjohnny, this looks the same thing I got on Colab #10217 (comment) #10217 (comment) |
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. |
This accounts for the
sudo pip install
(for both Red Hat and Debian patches) and pymalloc parts of #10208.