-
-
Notifications
You must be signed in to change notification settings - Fork 611
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
pip-compile resolver fails on pygobject: error: invalid command 'bdist_wheel' #1019
Comments
This is solved by installing
|
Hello @AndydeCleyre, Thanks for bringing this up. I must note, without wheel package you can't install |
Strangely, today, I'm having trouble reproducing with each of >> pip freeze --all | grep -i wheel
>> echo pygobject > requirements.in
>> python -m venv venv
>> . ./venv/bin/activate
>> pip freeze --all | grep -i wheel
>> pip uninstall wheel
WARNING: Skipping wheel as it is not installed.
>> pip install pygobject
Collecting pygobject
Collecting pycairo>=1.11.1 (from pygobject)
Installing collected packages: pycairo, pygobject
Successfully installed pycairo-1.18.2 pygobject-3.34.0
WARNING: You are using pip version 19.2.3, however version 19.3.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
>> pip install -q pip-tools
WARNING: You are using pip version 19.2.3, however version 19.3.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
>> pip-compile
#
# This file is autogenerated by pip-compile
# To update, run:
#
# pip-compile
#
pycairo==1.18.2 # via pygobject
pygobject==3.34.0
>> pip freeze --all
Click==7.0
pip==19.2.3
pip-tools==4.3.0
pycairo==1.18.2
PyGObject==3.34.0
setuptools==41.2.0
six==1.13.0
>> pip uninstall wheel
WARNING: Skipping wheel as it is not installed.
>> python --version
Python 3.8.0
>> pip-compile --version
pip-compile, version 4.3.0
>> pip --version
pip 19.2.3 from /home/andy/Code/wheeltest/venv/lib/python3.8/site-packages/pip (python 3.8) Possibly because: >> find venv/lib/python3.8/site-packages -name wheel.py
venv/lib/python3.8/site-packages/pip/_internal/commands/wheel.py
venv/lib/python3.8/site-packages/pip/_internal/wheel.py
venv/lib/python3.8/site-packages/pip/_internal/distributions/wheel.py
venv/lib/python3.8/site-packages/pip/_vendor/distlib/wheel.py
venv/lib/python3.8/site-packages/setuptools/wheel.py But all the versions are the same so I don't know why things seem different. |
Once pip gets built the wheel it installs the package from cache. Could you remove the cache and try again? |
Ah, thank you. After clearing the cache, I can reproduce the >> rm -rf ~/.cache/pip*
>> pip freeze --all | grep -i wheel
>> echo pygobject > requirements.in
>> python -m venv venv
>> . ./venv/bin/activate
>> pip freeze --all | grep -i wheel
>> pip uninstall wheel
WARNING: Skipping wheel as it is not installed.
>> pip install pygobject
Collecting pygobject
Downloading https://files.pythonhosted.org/packages/46/8a/b183f3edc812d4d28c8b671a922b5bc2863be5d38c56b3ad9155815e78dd/PyGObject-3.34.0.tar.gz (699kB)
|████████████████████████████████| 706kB 3.0MB/s
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... done
Collecting pycairo>=1.11.1 (from pygobject)
Using cached https://files.pythonhosted.org/packages/3c/1a/c0478ecab31baae50fda9956547788afbd0ca563adc52c9b03cab30f17eb/pycairo-1.18.2.tar.gz
Building wheels for collected packages: pygobject
Building wheel for pygobject (PEP 517) ... done
Created wheel for pygobject: filename=PyGObject-3.34.0-cp38-cp38-linux_x86_64.whl size=908357 sha256=aa8f8db53e1a4857bd01c3eb65da78b3bb6a8381ad71923be50d23d589a8a6b4
Stored in directory: /home/andy/.cache/pip/wheels/af/8d/e7/02a3e2f361fb8186f88fbccb308e96b64db062fe61b44dc5ab
Successfully built pygobject
Installing collected packages: pycairo, pygobject
Running setup.py install for pycairo ... done
Successfully installed pycairo-1.18.2 pygobject-3.34.0
WARNING: You are using pip version 19.2.3, however version 19.3.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
>> pip install -q pip-tools
WARNING: You are using pip version 19.2.3, however version 19.3.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
>> pip-compile
Command errored out with exit status 1:
command: /home/andy/Code/wheeltest/venv/bin/python /home/andy/Code/wheeltest/venv/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /tmp/tmp7tk7i2ws
cwd: /tmp/tmp203_7gnkbuild/pygobject
Complete output (12 lines):
running dist_info
creating /tmp/tmp203_7gnkbuild/pygobject/pip-wheel-metadata/PyGObject.egg-info
writing /tmp/tmp203_7gnkbuild/pygobject/pip-wheel-metadata/PyGObject.egg-info/PKG-INFO
writing dependency_links to /tmp/tmp203_7gnkbuild/pygobject/pip-wheel-metadata/PyGObject.egg-info/dependency_links.txt
writing requirements to /tmp/tmp203_7gnkbuild/pygobject/pip-wheel-metadata/PyGObject.egg-info/requires.txt
writing top-level names to /tmp/tmp203_7gnkbuild/pygobject/pip-wheel-metadata/PyGObject.egg-info/top_level.txt
writing manifest file '/tmp/tmp203_7gnkbuild/pygobject/pip-wheel-metadata/PyGObject.egg-info/SOURCES.txt'
reading manifest file '/tmp/tmp203_7gnkbuild/pygobject/pip-wheel-metadata/PyGObject.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file '/tmp/tmp203_7gnkbuild/pygobject/pip-wheel-metadata/PyGObject.egg-info/SOURCES.txt'
creating '/tmp/tmp203_7gnkbuild/pygobject/pip-wheel-metadata/PyGObject.dist-info'
error: invalid command 'bdist_wheel'
----------------------------------------
Traceback (most recent call last):
File "/home/andy/Code/wheeltest/venv/bin/pip-compile", line 10, in <module>
sys.exit(cli())
File "/home/andy/Code/wheeltest/venv/lib/python3.8/site-packages/click/core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "/home/andy/Code/wheeltest/venv/lib/python3.8/site-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/home/andy/Code/wheeltest/venv/lib/python3.8/site-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/andy/Code/wheeltest/venv/lib/python3.8/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/home/andy/Code/wheeltest/venv/lib/python3.8/site-packages/click/decorators.py", line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File "/home/andy/Code/wheeltest/venv/lib/python3.8/site-packages/piptools/scripts/compile.py", line 359, in cli
results = resolver.resolve(max_rounds=max_rounds)
File "/home/andy/Code/wheeltest/venv/lib/python3.8/site-packages/piptools/resolver.py", line 168, in resolve
has_changed, best_matches = self._resolve_one_round()
File "/home/andy/Code/wheeltest/venv/lib/python3.8/site-packages/piptools/resolver.py", line 263, in _resolve_one_round
their_constraints.extend(self._iter_dependencies(best_match))
File "/home/andy/Code/wheeltest/venv/lib/python3.8/site-packages/piptools/resolver.py", line 358, in _iter_dependencies
dependencies = self.repository.get_dependencies(ireq)
File "/home/andy/Code/wheeltest/venv/lib/python3.8/site-packages/piptools/repositories/pypi.py", line 268, in get_dependencies
self._dependencies_cache[ireq] = self.resolve_reqs(
File "/home/andy/Code/wheeltest/venv/lib/python3.8/site-packages/piptools/repositories/pypi.py", line 225, in resolve_reqs
results = resolver._resolve_one(reqset, ireq)
File "/home/andy/Code/wheeltest/venv/lib/python3.8/site-packages/pip/_internal/legacy_resolve.py", line 359, in _resolve_one
abstract_dist = self._get_abstract_dist_for(req_to_install)
File "/home/andy/Code/wheeltest/venv/lib/python3.8/site-packages/pip/_internal/legacy_resolve.py", line 305, in _get_abstract_dist_for
abstract_dist = self.preparer.prepare_linked_requirement(
File "/home/andy/Code/wheeltest/venv/lib/python3.8/site-packages/pip/_internal/operations/prepare.py", line 214, in prepare_linked_requirement
abstract_dist.prepare_distribution_metadata(
File "/home/andy/Code/wheeltest/venv/lib/python3.8/site-packages/pip/_internal/distributions/source.py", line 79, in prepare_distribution_metadata
self.req.prepare_metadata()
File "/home/andy/Code/wheeltest/venv/lib/python3.8/site-packages/pip/_internal/req/req_install.py", line 549, in prepare_metadata
self.prepare_pep517_metadata()
File "/home/andy/Code/wheeltest/venv/lib/python3.8/site-packages/pip/_internal/req/req_install.py", line 593, in prepare_pep517_metadata
distinfo_dir = backend.prepare_metadata_for_build_wheel(
File "/home/andy/Code/wheeltest/venv/lib/python3.8/site-packages/pip/_vendor/pep517/wrappers.py", line 84, in prepare_metadata_for_build_wheel
return self._call_hook('prepare_metadata_for_build_wheel', {
File "/home/andy/Code/wheeltest/venv/lib/python3.8/site-packages/pip/_vendor/pep517/wrappers.py", line 152, in _call_hook
self._subprocess_runner(
File "/home/andy/Code/wheeltest/venv/lib/python3.8/site-packages/pip/_internal/req/req_install.py", line 528, in runner
call_subprocess(
File "/home/andy/Code/wheeltest/venv/lib/python3.8/site-packages/pip/_internal/utils/misc.py", line 931, in call_subprocess
raise InstallationError(exc_msg)
pip._internal.exceptions.InstallationError: Command errored out with exit status 1: /home/andy/Code/wheeltest/venv/bin/python /home/andy/Code/wheeltest/venv/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /tmp/tmp7tk7i2ws Check the logs for full command output.
>> pip uninstall wheel
WARNING: Skipping wheel as it is not installed.
>> python --version
Python 3.8.0
>> pip-compile --version
pip-compile, version 4.3.0
>> pip --version
pip 19.2.3 from /home/andy/Code/wheeltest/venv/lib/python3.8/site-packages/pip (python 3.8)
>> pip-sync /dev/null
Uninstalling pycairo-1.18.2:
Successfully uninstalled pycairo-1.18.2
Uninstalling PyGObject-3.34.0:
Successfully uninstalled PyGObject-3.34.0
>> pip freeze --all
Click==7.0
pip==19.2.3
pip-tools==4.3.0
setuptools==41.2.0
six==1.13.0
>> pip install --no-cache-dir pygobject
Collecting pygobject
Downloading https://files.pythonhosted.org/packages/46/8a/b183f3edc812d4d28c8b671a922b5bc2863be5d38c56b3ad9155815e78dd/PyGObject-3.34.0.tar.gz (699kB)
|████████████████████████████████| 706kB 3.2MB/s
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... done
Collecting pycairo>=1.11.1 (from pygobject)
Downloading https://files.pythonhosted.org/packages/3c/1a/c0478ecab31baae50fda9956547788afbd0ca563adc52c9b03cab30f17eb/pycairo-1.18.2.tar.gz (200kB)
|████████████████████████████████| 204kB 43.3MB/s
Building wheels for collected packages: pygobject
Building wheel for pygobject (PEP 517) ... done
Created wheel for pygobject: filename=PyGObject-3.34.0-cp38-cp38-linux_x86_64.whl size=908309 sha256=40bf5aa98597baaffc8277e12ebc26021f565f9d46a7c98e78fbef327cf8342b
Stored in directory: /tmp/pip-ephem-wheel-cache-7b1u7lxd/wheels/af/8d/e7/02a3e2f361fb8186f88fbccb308e96b64db062fe61b44dc5ab
Successfully built pygobject
Installing collected packages: pycairo, pygobject
Running setup.py install for pycairo ... done
Successfully installed pycairo-1.18.2 pygobject-3.34.0
WARNING: You are using pip version 19.2.3, however version 19.3.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command. |
Could you file an issue to pip's issue tracker? |
But I am not experiencing any problems installing with pip. Only pip-compile fails. EDIT: Reproduction steps: rm -rf ~/.cache/pip*
python3 -m venv venv
. ./venv/bin/activate
pip install pip-tools pygobject # (no problems)
echo pygobject > requirements.in
pip-compile # (problems) |
It could be reproduced with pip: $ pip install pygobject --no-build-isolation
Collecting pygobject
Using cached https://files.pythonhosted.org/packages/46/8a/b183f3edc812d4d28c8b671a922b5bc2863be5d38c56b3ad9155815e78dd/PyGObject-3.34.0.tar.gz
Preparing wheel metadata ... error
ERROR: Command errored out with exit status 1:
command: /Users/albert/Projects/pip-tools/.venv/bin/python3.7 /Users/albert/Projects/pip-tools/.venv/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /var/folders/4x/rz_w89dx1z3bydfd6qpdjn_h0000gn/T/tmpukg61j22
cwd: /private/var/folders/4x/rz_w89dx1z3bydfd6qpdjn_h0000gn/T/pip-install-_y_hsmmo/pygobject
Complete output (12 lines):
running dist_info
creating /private/var/folders/4x/rz_w89dx1z3bydfd6qpdjn_h0000gn/T/pip-modern-metadata-04bobzf8/PyGObject.egg-info
writing /private/var/folders/4x/rz_w89dx1z3bydfd6qpdjn_h0000gn/T/pip-modern-metadata-04bobzf8/PyGObject.egg-info/PKG-INFO
writing dependency_links to /private/var/folders/4x/rz_w89dx1z3bydfd6qpdjn_h0000gn/T/pip-modern-metadata-04bobzf8/PyGObject.egg-info/dependency_links.txt
writing requirements to /private/var/folders/4x/rz_w89dx1z3bydfd6qpdjn_h0000gn/T/pip-modern-metadata-04bobzf8/PyGObject.egg-info/requires.txt
writing top-level names to /private/var/folders/4x/rz_w89dx1z3bydfd6qpdjn_h0000gn/T/pip-modern-metadata-04bobzf8/PyGObject.egg-info/top_level.txt
writing manifest file '/private/var/folders/4x/rz_w89dx1z3bydfd6qpdjn_h0000gn/T/pip-modern-metadata-04bobzf8/PyGObject.egg-info/SOURCES.txt'
reading manifest file '/private/var/folders/4x/rz_w89dx1z3bydfd6qpdjn_h0000gn/T/pip-modern-metadata-04bobzf8/PyGObject.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file '/private/var/folders/4x/rz_w89dx1z3bydfd6qpdjn_h0000gn/T/pip-modern-metadata-04bobzf8/PyGObject.egg-info/SOURCES.txt'
creating '/private/var/folders/4x/rz_w89dx1z3bydfd6qpdjn_h0000gn/T/pip-modern-metadata-04bobzf8/PyGObject.dist-info'
error: invalid command 'bdist_wheel'
----------------------------------------
ERROR: Command errored out with exit status 1: /Users/albert/Projects/pip-tools/.venv/bin/python3.7 /Users/albert/Projects/pip-tools/.venv/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /var/folders/4x/rz_w89dx1z3bydfd6qpdjn_h0000gn/T/tmpukg61j22 Check the logs for full command output. Also, pip-compile could be fixed with --build-isolation flag, see: $ echo pygobject | pip-compile - -qo- --build-isolation
#
# This file is autogenerated by pip-compile
# To update, run:
#
# pip-compile --build-isolation --output-file=- -
#
pycairo==1.18.2 # via pygobject
pygobject==3.34.0 The problem is pip uses by default I think it's time to change the default value to --build-isolation. |
FTR, a tracking issue #1030 for making |
Thanks very much! It's fine with me if this issue is closed and subsumed by #1030 |
I'll close this based on the above. Thanks for the issue! |
I look forward to this becoming irrelevant when pip gets a robust resolver of its own for us to use.
Environment Versions
Steps to replicate
Expected result
Actual result
The text was updated successfully, but these errors were encountered: