Pip 22.1 (only) fails when included in pyproject.toml
See original GitHub issueDescription
Starting with pip 22.1, including “pip” in the pyproject.toml [build-system] requires fails.
Example pyproject.toml:
[build-system]
requires = [
"setuptools>=40.8.0",
"wheel",
"pip"
]
build-backend = "setuptools.build_meta"
Error:
(venv) D:\Dev\myPyPackage>python -m pip install D:\Dev\myPyPackage
Looking in indexes: https://pypi.org/simple
Processing d:\dev\mypypackage
Installing build dependencies ... error
error: subprocess-exited-with-error
× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> [9 lines of output]
Looking in indexes: https://pypi.org/simple
Collecting setuptools>=40.8.0
Using cached setuptools-62.2.0-py3-none-any.whl (1.1 MB)
Collecting wheel
Using cached wheel-0.37.1-py2.py3-none-any.whl (35 kB)
Collecting pip
Using cached pip-22.1-py3-none-any.whl (2.1 MB)
ERROR: To modify pip, please run the following command:
D:\Dev\myPyPackage\venv\Scripts\python.exe -m pip install --ignore-installed --no-user --prefix C:\Users\cowlinator\AppData\Local\Temp\pip-build-env-upw4u049\overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple --trusted-host pypi.org -- setuptools>=40.8.0 wheel pip
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
Verified that this succeeds with pip 22.0.4
This error message repeatedly states that this is likely not a problem with pip… but it is the change from pip 22.0.4 to 22.1 that breaks it.
Expected behavior
I expect pip 22.1 to behave the same as pip 22.0.4; namely, that the installation succeeds.
Output when using pip 22.0.4:
(venv) D:\Dev\myPyPackage>python -m pip install D:\Dev\myPyPackage
Looking in indexes: https://pypi.org/simple
Processing d:\dev\mypypackage
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: hi
Building wheel for hi (pyproject.toml) ... done
Created wheel for hi: filename=hi-0.0.0-py3-none-any.whl size=1048 sha256=b5e4d2b574164c3e8c93ea425bd63f58876eb58087dedd259755a9326ddc84fd
Stored in directory: C:\Users\cowlinator\AppData\Local\Temp\pip-ephem-wheel-cache-u03_8ou9\wheels\6a\64\7b\c6556dc063c160509a71a3f427d795bea205706ceccf1319ff
Successfully built hi
Installing collected packages: hi
Successfully installed hi-0.0.0
WARNING: You are using pip version 22.0.4; however, version 22.1 is available.
You should consider upgrading via the 'D:\Dev\myPyPackage\venv\Scripts\python.exe -m pip install --upgrade pip' command.
pip version
22.1
Python version
3.7.9
OS
Windows 11 (21H2)
How to Reproduce
- Create a virtual environment and activate it
- Install pip 22.1
- Create a python package with a
pyproject.toml
containing:
[build-system]
requires = [
"setuptools>=40.8.0",
"wheel",
"pip"
]
build-backend = "setuptools.build_meta"
- Install this python package from the local directory with
python -m pip install <dir>
- Observe the error
Output
D:\Dev\myPyPackage>python -m venv venv && venv\Scripts\activate
(venv) D:\Dev\myPyPackage>python -m pip install --upgrade pip
Looking in indexes: https://pypi.org/simple
Collecting pip
Using cached pip-22.1-py3-none-any.whl (2.1 MB)
Installing collected packages: pip
Attempting uninstall: pip
Found existing installation: pip 20.1.1
Uninstalling pip-20.1.1:
Successfully uninstalled pip-20.1.1
Successfully installed pip-22.1
(venv) D:\Dev\myPyPackage>python -m pip install D:\Dev\myPyPackage
Looking in indexes: https://pypi.org/simple
Processing d:\dev\mypypackage
Installing build dependencies ... error
error: subprocess-exited-with-error
× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> [9 lines of output]
Looking in indexes: https://pypi.org/simple
Collecting setuptools>=40.8.0
Using cached setuptools-62.2.0-py3-none-any.whl (1.1 MB)
Collecting wheel
Using cached wheel-0.37.1-py2.py3-none-any.whl (35 kB)
Collecting pip
Using cached pip-22.1-py3-none-any.whl (2.1 MB)
ERROR: To modify pip, please run the following command:
D:\Dev\myPyPackage\venv\Scripts\python.exe -m pip install --ignore-installed --no-user --prefix C:\Users\cowlinator\AppData\Local\Temp\pip-build-env-upw4u049\overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple --trusted-host pypi.org -- setuptools>=40.8.0 wheel pip
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
Code of Conduct
- I agree to follow the PSF Code of Conduct.
Issue Analytics
- State:
- Created a year ago
- Comments:21 (15 by maintainers)
Top Results From Across the Web
e .` unless I delete `pyproject.toml` - Stack Overflow
I delete pyproject.toml and only then Running setup.py develop shows up. (webservice_tool) pk@LAP1:~/webservice_tool$ pip install -e ...
Read more >pip-tools Supports pyproject.toml - Hynek Schlawack
I'm on the record for liking pip-tools to pin my production dependencies, because it does one thing well. What I didn't realize is...
Read more >Dependency Resolution - pip documentation v22.3.1
This section provides practical suggestions to pip users who encounter a ResolutionImpossible error, where pip cannot install their specified packages due to ...
Read more >black · PyPI
Black can be installed by running pip install black . ... The vim plugin no longer crashes Black when there's boolean values in...
Read more >Python 3.11.0 and Meraki
This is a fresh install, with a fresh version of pip. ... Building wheel for multidict (pyproject.toml) ... error
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
AH, I see what’s happening now. Thanks for sharing this @grgmiller!
Why does wheel need to be there? Setuptools lists it as a dependency for building wheels and is automatically installed when necessary.