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.

Pip-complie fail on Python 3.11.0-beta.1 (pip._internal.exceptions.InstallationSubprocessError)

See original GitHub issue

Description

Only in Python 3.11.0-beta.1 (pass on Python 3.10 or below)

pip._internal.exceptions.InstallationSubprocessError is raise when running command pip-compile --quiet --upgrade --rebuild --output-file=requirements.txt requirements.in

ERROR:pip.subprocessor:[present-diagnostic] pip subprocess to install build dependencies exited with 1
Traceback (most recent call last):
  File "/home/runner/work/terminusdb-client-python/terminusdb-client-python/.tox/deps/bin/pip-compile", line 8, in <module>
    sys.exit(cli())
             ^^^^^
  File "/home/runner/work/terminusdb-client-python/terminusdb-client-python/.tox/deps/lib/python3.11/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/terminusdb-client-python/terminusdb-client-python/.tox/deps/lib/python3.11/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/home/runner/work/terminusdb-client-python/terminusdb-client-python/.tox/deps/lib/python3.11/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/terminusdb-client-python/terminusdb-client-python/.tox/deps/lib/python3.11/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/terminusdb-client-python/terminusdb-client-python/.tox/deps/lib/python3.11/site-packages/click/decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/terminusdb-client-python/terminusdb-client-python/.tox/deps/lib/python3.11/site-packages/piptools/scripts/compile.py", line 466, in cli
    results = resolver.resolve(max_rounds=max_rounds)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/terminusdb-client-python/terminusdb-client-python/.tox/deps/lib/python3.11/site-packages/piptools/resolver.py", line 175, in resolve
    has_changed, best_matches = self._resolve_one_round()
                                ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/terminusdb-client-python/terminusdb-client-python/.tox/deps/lib/python3.11/site-packages/piptools/resolver.py", line 319, in _resolve_one_round
    their_constraints.extend(self._iter_dependencies(best_match))
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/terminusdb-client-python/terminusdb-client-python/.tox/deps/lib/python3.11/site-packages/piptools/resolver.py", line 428, in _iter_dependencies
    dependencies = self.repository.get_dependencies(ireq)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/terminusdb-client-python/terminusdb-client-python/.tox/deps/lib/python3.11/site-packages/piptools/repositories/pypi.py", line 243, in get_dependencies
    self._dependencies_cache[ireq] = self.resolve_reqs(
                                     ^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/terminusdb-client-python/terminusdb-client-python/.tox/deps/lib/python3.11/site-packages/piptools/repositories/pypi.py", line 206, in resolve_reqs
    results = resolver._resolve_one(reqset, ireq)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/terminusdb-client-python/terminusdb-client-python/.tox/deps/lib/python3.11/site-packages/pip/_internal/resolution/legacy/resolver.py", line 379, in _resolve_one
    dist = self._get_dist_for(req_to_install)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/terminusdb-client-python/terminusdb-client-python/.tox/deps/lib/python3.11/site-packages/pip/_internal/resolution/legacy/resolver.py", line 332, in _get_dist_for
    dist = self.preparer.prepare_linked_requirement(req)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/terminusdb-client-python/terminusdb-client-python/.tox/deps/lib/python3.11/site-packages/pip/_internal/operations/prepare.py", line [48](https://github.com/terminusdb/terminusdb-client-python/runs/6350948840?check_suite_focus=true#step:4:48)7, in prepare_linked_requirement
    return self._prepare_linked_requirement(req, parallel_builds)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/terminusdb-client-python/terminusdb-client-python/.tox/deps/lib/python3.11/site-packages/pip/_internal/operations/prepare.py", line [55](https://github.com/terminusdb/terminusdb-client-python/runs/6350948840?check_suite_focus=true#step:4:55)6, in _prepare_linked_requirement
    dist = _get_prepared_distribution(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/terminusdb-client-python/terminusdb-client-python/.tox/deps/lib/python3.11/site-packages/pip/_internal/operations/prepare.py", line 58, in _get_prepared_distribution
    abstract_dist.prepare_distribution_metadata(finder, build_isolation)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/terminusdb-client-python/terminusdb-client-python/.tox/deps/lib/python3.11/site-packages/pip/_internal/distributions/sdist.py", line 35, in prepare_distribution_metadata
    self._prepare_build_backend(finder)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/terminusdb-client-python/terminusdb-client-python/.tox/deps/lib/python3.11/site-packages/pip/_internal/distributions/sdist.py", line [56](https://github.com/terminusdb/terminusdb-client-python/runs/6350948840?check_suite_focus=true#step:4:56), in _prepare_build_backend
    self.req.build_env.install_requirements(
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/terminusdb-client-python/terminusdb-client-python/.tox/deps/lib/python3.11/site-packages/pip/_internal/build_env.py", line 202, in install_requirements
    self._install_requirements(
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/terminusdb-client-python/terminusdb-client-python/.tox/deps/lib/python3.11/site-packages/pip/_internal/build_env.py", line 2[60](https://github.com/terminusdb/terminusdb-client-python/runs/6350948840?check_suite_focus=true#step:4:60), in _install_requirements
    call_subprocess(
    ^^^^^^^^^^^^^^^^
  File "/home/runner/work/terminusdb-client-python/terminusdb-client-python/.tox/deps/lib/python3.11/site-packages/pip/_internal/utils/subprocess.py", line 224, in call_subprocess
    raise error
    ^^^^^^^^^^^
pip._internal.exceptions.InstallationSubprocessError: pip subprocess to install build dependencies exited with 1
ERROR: InvocationError for command /home/runner/work/terminusdb-client-python/terminusdb-client-python/.tox/deps/bin/pip-compile --quiet --upgrade --rebuild --output-file=requirements.txt requirements.in (exited with code 1)

See https://github.com/terminusdb/terminusdb-client-python/runs/6350948840?check_suite_focus=true#step:4:45 and https://github.com/terminusdb/terminusdb-client-python/pull/306

Expected behavior

Pass like Python 3.10

pip version

22.0.4

Python version

3.11.0-beta.1

OS

Ubuntu 20.04.4 (on GH action)

How to Reproduce

pip-compile --quiet --upgrade --rebuild --output-file=requirements.txt requirements.in

Output

No response

Code of Conduct

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
Cheuktingcommented, May 10, 2022

Just to tie things up, I discover that it is caused by the build failure for pandas on Python 3.11 while running the command pip install pandas on Python 3.11.0a7

Collecting pandas
  Using cached pandas-1.4.2.tar.gz (4.9 MB)
  Installing build dependencies ... error
  error: subprocess-exited-with-error
  
  × pip subprocess to install build dependencies did not run successfully.
  │ exit code: 1
  ╰─> [1556 lines of output]

The problem would be from the C compiler. I will look into that direction

1reaction
Cheuktingcommented, May 9, 2022

Ok, I will have a look there. Thanks.

Read more comments on GitHub >

github_iconTop Results From Across the Web

python - Pip 21.1 can't import InvalidSchemeCombination
ImportError: cannot import name 'InvalidSchemeCombination ' from 'pip._internal.exceptions'. The reason behind ...
Read more >
ensurepip — Bootstrapping the pip installer — Python 3.11.1 ...
Source code: Lib/ensurepip The ensurepip package provides support for bootstrapping the pip installer into an existing Python installation or virtual ...
Read more >
HOW TO FIX - PIP IS NOT RECOGNIZED AS INTERNAL OR ...
HOW TO FIX - PIP IS NOT RECOGNIZED AS INTERNAL OR EXTERNAL COMMAND ERROR IN PYTHON || PIP ERRORREASON : IMPROPER SETTING OF...
Read more >
Changelog - pip documentation v22.3.1
Bug Fixes#. Fix entry point generation of pip.X , pipX.Y , and easy_install-X.Y to correctly account for multi-digit Python version segments (e.g. the...
Read more >
When should you upgrade to Python 3.11?
When I tried to install it on Python 3.11 on the day of 3.11's release, things don't go well: $ python3.11 -m pip...
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