question-mark
Stuck on an issue?

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

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

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'"

See original GitHub issue

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 WARNING: 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 WARNING: 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 WARNING: 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 WARNING: 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 WARNING: 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 Collecting 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   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   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   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   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   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   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   Attempting uninstall: pip
2021-04-28T12:59:29.8890924Z     Found existing installation: pip 21.0.1
2021-04-28T12:59:29.8905232Z 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'

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

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
uranusjrcommented, Apr 29, 2021

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

0reactions
uranusjrcommented, 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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Create an Account - Red Hat Bugzilla
Description of problem: Using get-pip.py [1] on Fedora 34 when pip is ... Could not install packages due to an OSError: [Errno 2]...
Read more >
python: can't open file get-pip.py error 2] no such file or directory
For Linux/Mac, you can go for curl 'https://bootstrap.pypa.io/get-pip.py' > get-pip.py && sudo python get-pip.py. Fetching installer; Executing file with ...
Read more >
Can't update Python packages - Ask Fedora
The initial error (when running pip-review --local --interactive) ERROR: Command errored out with exit status 2: command: /usr/bin/python3 -c 'import sys, ...
Read more >
python: can't open file 'setup.py': [Errno 2] No such file ... - GitHub
I'm going to close the issue though since it isn't related to this package. 1
Read more >
How to install PIP on Fedora 34? - Osradar
This will start the installation which should not take too long. In the end, you can check the installed version pip3 --version. Sample...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

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

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found