Unable to build no-binary :all: with use-pep517
See original GitHub issueEnvironment
- pip version: 20.0.2
- Python version: 3.8.1
- OS: macOS 10.15.3
Description
As distlib doesn’t publish a wheel, and because it has an implicit dependency on setuptools, I’m attempting to use --use-pep517
to force pip to ensure that setuptools/wheel are present for building, but when I do, pip fails to install wheel:
~ $ pip install --use-pep517 --no-binary :all: distlib
Collecting distlib
Using cached distlib-0.3.0.zip (571 kB)
Installing build dependencies ... error
ERROR: Command errored out with exit status 1:
command: /usr/local/bin/python /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-build-env-6j9zlufg/overlay --no-warn-script-location --no-binary :all: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=40.8.0' wheel
cwd: None
Complete output (13 lines):
Collecting setuptools>=40.8.0
Using cached setuptools-45.3.0.zip (862 kB)
Collecting wheel
Using cached wheel-0.34.2.tar.gz (58 kB)
ERROR: Command errored out with exit status 1:
command: /usr/local/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-install-hd2m84od/wheel/setup.py'"'"'; __file__='"'"'/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-install-hd2m84od/wheel/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-install-hd2m84od/wheel/pip-egg-info
cwd: /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-install-hd2m84od/wheel/
Complete output (3 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'setuptools'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/local/bin/python /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-build-env-6j9zlufg/overlay --no-warn-script-location --no-binary :all: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=40.8.0' wheel Check the logs for full command output.
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.8/bin/pip-run", line 8, in <module>
sys.exit(run())
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pip_run/__init__.py", line 18, in run
with deps.load(*deps.not_installed(pip_args)) as home:
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/contextlib.py", line 113, in __enter__
return next(self.gen)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pip_run/deps.py", line 75, in load
_installable(args) and subprocess.check_call(cmd)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '('/usr/local/bin/python', '-m', 'pip', 'install', '-t', '/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-run-mzykfthi', '--use-pep517', '--no-binary', ':all:', 'distlib')' returned non-zero exit status 1.
Expected behavior
pip
should be able to assemble a build environment, either by disabling the no-binary
option for those requirements or (preferably) by providing a bootstrap environment for these build dependencies.
Note: This may be an issue that can be addressed with wheel.
Issue Analytics
- State:
- Created 4 years ago
- Comments:12 (11 by maintainers)
Top Results From Across the Web
Could not build wheels for _ which use PEP 517 and cannot ...
sudo pip3 install _____ --no-binary :all: Where ____ is obviously the name of the library you want to install. Share.
Read more >pip-wheel(1) - Arch manual pages
'pip wheel' uses the build system interface as described here: ... Packages without binary distributions will fail to install when this option is...
Read more >Python SDK install failed with PEP 517 - Couchbase Forums
Then I tried “pip install --no-binary :all: couchbase”, get the same error again. ERROR: Could not build wheels for couchbase which use PEP...
Read more >pip install - pip documentation v22.3.1
Use PEP 517 for building source distributions (use --no-use-pep517 to force ... Packages without binary distributions will fail to install when this option ......
Read more >could not build wheels for ninja - You.com | The AI Search ...
"Could not build wheels for ____ which use PEP 517 and cannot be installed directly". is the following: sudo pip3 install _____ --no-binary...
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
Is this not the situation that in-tree build backends were designed to address? Does setuptools configure itself as its own in-tree build backend? If not, then maybe it needs to for the
--no-binaty :all:
case.I ran into this issue again today, this time with
pip download
. I was attempting to download the sources forxattr
:Because I’m trying to be a good citizen and operate without
setuptools
being installed, that operation failed with:When setuptools tries to build from source, which tries to build wheel from source, and setuptools isn’t present.
I tried instead to employ pep517, but that failed similarly:
The only way I know to make it work is to pre-install setuptools (works with or without
--use-pep517
). I was surprised that--use-pep517
succeeded.