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

On fresh fedora 34, get-pip.py fails with "No such file or directory: '/usr/lib/python3.9/site-packages/pip-21.0.1.dist-info/RECORD'" #9904

Closed
1 task done
alex opened this issue Apr 28, 2021 · 8 comments
Labels
type: bug A confirmed bug or unintended behavior

Comments

@alex
Copy link
Member

alex commented Apr 28, 2021

Description

Attempting to install pip with get-pip fails:

2021-04-28T12:59:26.7976164Z Step 4/7 : RUN curl -sSL https://bootstrap.pypa.io/get-pip.py | python
2021-04-28T12:59:26.8166783Z  ---> Running in a2954bc3c96e
2021-04-28T12:59:29.3543158Z �[91mWARNING: Value for scheme.platlib does not match. Please report this to <https://github.com/pypa/pip/issues/9617>
2021-04-28T12:59:29.3544892Z distutils: /usr/local/lib64/python3.9/site-packages
2021-04-28T12:59:29.3546419Z sysconfig: /usr/lib64/python3.9/site-packages
2021-04-28T12:59:29.3548101Z �[0m�[91mWARNING: Value for scheme.purelib does not match. Please report this to <https://github.com/pypa/pip/issues/9617>
2021-04-28T12:59:29.3549400Z distutils: /usr/local/lib/python3.9/site-packages
2021-04-28T12:59:29.3550604Z sysconfig: /usr/lib/python3.9/site-packages
2021-04-28T12:59:29.3551984Z WARNING: Value for scheme.headers does not match. Please report this to <https://github.com/pypa/pip/issues/9617>
2021-04-28T12:59:29.3553251Z distutils: /usr/local/include/python3.9/UNKNOWN
2021-04-28T12:59:29.3554404Z sysconfig: /usr/include/python3.9
2021-04-28T12:59:29.3556198Z �[0m�[91mWARNING: Value for scheme.scripts does not match. Please report this to <https://github.com/pypa/pip/issues/9617>
2021-04-28T12:59:29.3557232Z distutils: /usr/local/bin
2021-04-28T12:59:29.3558047Z sysconfig: /usr/bin
2021-04-28T12:59:29.3559304Z �[0m�[91mWARNING: Value for scheme.data does not match. Please report this to <https://github.com/pypa/pip/issues/9617>
2021-04-28T12:59:29.3560216Z distutils: /usr/local
2021-04-28T12:59:29.3561716Z sysconfig: /usr
2021-04-28T12:59:29.3562374Z �[0m�[91mWARNING: Additional context:
2021-04-28T12:59:29.3563561Z user = False
2021-04-28T12:59:29.3563953Z home = None
2021-04-28T12:59:29.3564310Z root = None
2021-04-28T12:59:29.3564694Z prefix = None
2021-04-28T12:59:29.5836757Z �[0mCollecting pip
2021-04-28T12:59:29.6254056Z   Downloading pip-21.1-py3-none-any.whl (1.5 MB)
2021-04-28T12:59:29.8031491Z Collecting wheel
2021-04-28T12:59:29.8107234Z   Downloading wheel-0.36.2-py2.py3-none-any.whl (35 kB)
2021-04-28T12:59:29.8526420Z Installing collected packages: wheel, pip
2021-04-28T12:59:29.8567247Z �[91m  WARNING: Value for scheme.platlib does not match. Please report this to <https://github.com/pypa/pip/issues/9617>
2021-04-28T12:59:29.8568445Z   distutils: /usr/local/lib64/python3.9/site-packages
2021-04-28T12:59:29.8569294Z   sysconfig: /usr/lib64/python3.9/site-packages
2021-04-28T12:59:29.8570561Z �[0m�[91m  WARNING: Value for scheme.purelib does not match. Please report this to <https://github.com/pypa/pip/issues/9617>
2021-04-28T12:59:29.8571623Z   distutils: /usr/local/lib/python3.9/site-packages
2021-04-28T12:59:29.8572392Z   sysconfig: /usr/lib/python3.9/site-packages
2021-04-28T12:59:29.8573506Z �[0m�[91m  WARNING: Value for scheme.headers does not match. Please report this to <https://github.com/pypa/pip/issues/9617>
2021-04-28T12:59:29.8574677Z   distutils: /usr/local/include/python3.9/wheel
2021-04-28T12:59:29.8575240Z   sysconfig: /usr/include/python3.9/wheel
2021-04-28T12:59:29.8576367Z �[0m�[91m  WARNING: Value for scheme.scripts does not match. Please report this to <https://github.com/pypa/pip/issues/9617>
2021-04-28T12:59:29.8577145Z   distutils: /usr/local/bin
2021-04-28T12:59:29.8577575Z   sysconfig: /usr/bin
2021-04-28T12:59:29.8578544Z �[0m�[91m  WARNING: Value for scheme.data does not match. Please report this to <https://github.com/pypa/pip/issues/9617>
2021-04-28T12:59:29.8579306Z   distutils: /usr/local
2021-04-28T12:59:29.8579688Z   sysconfig: /usr
2021-04-28T12:59:29.8580281Z �[0m�[91m  WARNING: Additional context:
2021-04-28T12:59:29.8580943Z   user = False
2021-04-28T12:59:29.8581300Z   home = None
2021-04-28T12:59:29.8581649Z   root = None
2021-04-28T12:59:29.8581996Z   prefix = None
2021-04-28T12:59:29.8887215Z �[0m  Attempting uninstall: pip
2021-04-28T12:59:29.8890924Z     Found existing installation: pip 21.0.1
2021-04-28T12:59:29.8905232Z �[91mERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory: '/usr/lib/python3.9/site-packages/pip-21.0.1.dist-info/RECORD'

Expected behavior

pip is installed correctly

pip version

latest get-pip.py

Python version

3.9.4

OS

Fedora 34

How to Reproduce

$ docker run --rm -it registry.fedoraproject.org/fedora:latest
$$ dnf install -y gcc redhat-rpm-config libffi-devel python python-devel     python3-devel openssl-devel git findutils which
[...]
$$ curl -sSL https://bootstrap.pypa.io/get-pip.py | python
WARNING: Value for scheme.platlib does not match. Please report this to <https://github.com/pypa/pip/issues/9617>
distutils: /usr/local/lib64/python3.9/site-packages
sysconfig: /usr/lib64/python3.9/site-packages
WARNING: Value for scheme.purelib does not match. Please report this to <https://github.com/pypa/pip/issues/9617>
distutils: /usr/local/lib/python3.9/site-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/9617>
distutils: /usr/local/include/python3.9/UNKNOWN
sysconfig: /usr/include/python3.9
WARNING: Value for scheme.scripts does not match. Please report this to <https://github.com/pypa/pip/issues/9617>
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/9617>
distutils: /usr/local
sysconfig: /usr
WARNING: Additional context:
user = False
home = None
root = None
prefix = None
Collecting pip
  Downloading pip-21.1-py3-none-any.whl (1.5 MB)
     |████████████████████████████████| 1.5 MB 2.2 MB/s 
Collecting wheel
  Downloading wheel-0.36.2-py2.py3-none-any.whl (35 kB)
Installing collected packages: wheel, pip
  WARNING: Value for scheme.platlib does not match. Please report this to <https://github.com/pypa/pip/issues/9617>
  distutils: /usr/local/lib64/python3.9/site-packages
  sysconfig: /usr/lib64/python3.9/site-packages
  WARNING: Value for scheme.purelib does not match. Please report this to <https://github.com/pypa/pip/issues/9617>
  distutils: /usr/local/lib/python3.9/site-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/9617>
  distutils: /usr/local/include/python3.9/wheel
  sysconfig: /usr/include/python3.9/wheel
  WARNING: Value for scheme.scripts does not match. Please report this to <https://github.com/pypa/pip/issues/9617>
  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/9617>
  distutils: /usr/local
  sysconfig: /usr
  WARNING: Additional context:
  user = False
  home = None
  root = None
  prefix = None
  Attempting uninstall: pip
    Found existing installation: pip 21.0.1
ERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory: '/usr/lib/python3.9/site-packages/pip-21.0.1.dist-info/RECORD'

Output

No response

Code of Conduct

@alex alex added S: needs triage Issues/PRs that need to be triaged type: bug A confirmed bug or unintended behavior labels Apr 28, 2021
@uranusjr
Copy link
Member

Don’t use get-pip.py against your system Python, it’s going to break a lot of stuff and you will regret it.

@alex
Copy link
Member Author

alex commented Apr 29, 2021

That's... a surprising response. We've been using this approach for years, in fact this is how I thought you were supposed to use get-pip! I guess nowadays ensure-pip is the correct approach...

@RonnyPfannschmidt
Copy link
Contributor

@alex the system python should use the system pip package

@uranusjr
Copy link
Member

Yes, if you’re using Python from yum, you should use the python-pip package from the system package manager (or whatever it’s called for the version you want).

If you explicitly want a different pip version that’s not provided by the distro package manager, use a virtual environments instead (in which you can pip install anything you want, including pip itself).

@hroncok
Copy link
Contributor

hroncok commented Aug 2, 2021

As far as the error goes, this should be improved via #9949

@uranusjr
Copy link
Member

uranusjr commented Aug 2, 2021

Which is included in 21.2+ released recently.

@hroncok
Copy link
Contributor

hroncok commented Aug 2, 2021

But not yet in https://bootstrap.pypa.io/get-pip.py

@uranusjr
Copy link
Member

uranusjr commented Aug 2, 2021

Oh! Right, I forgot about that. I was having trouble updating the scripts on Windows (pypa/get-pip#121) and need to fix it before generating an update (or set up another developement machine). I hope to get to that this weekend, after I cut 21.2.3.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 24, 2021
@pradyunsg pradyunsg removed the S: needs triage Issues/PRs that need to be triaged label Mar 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: bug A confirmed bug or unintended behavior
Projects
None yet
Development

No branches or pull requests

5 participants