Skip to content

pipenv failed to lock Pipfile.lock with ERROR: pip subprocess to install build dependencies exited with 1 #6377

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

Closed
khteh opened this issue Apr 19, 2025 · 5 comments

Comments

@khteh
Copy link

khteh commented Apr 19, 2025

Issue description

Hit the following error on Ubuntu 25.04:

Pipfile.lock not found, creating...
Locking [packages] dependencies...
Building requirements...
Resolving dependencies...
INFO:pipenv.patched.pip._internal.resolution.resolvelib.reporter:Reporter.starting()
INFO:pipenv.patched.pip._internal.resolution.resolvelib.reporter:Reporter.adding_requirement(SpecifierRequirement('pygame'), None)
INFO:pipenv.patched.pip._internal.operations.prepare:Collecting pygame (from -r /tmp/pipenv-2_o3g79n-requirements/pipenv-5a6vt74x-constraints.txt (line 6))
INFO:pipenv.patched.pip._internal.network.download:Downloading pygame-2.6.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (12 kB)
INFO:pipenv.patched.pip._internal.resolution.resolvelib.reporter:Reporter.adding_requirement(SpecifierRequirement('opencv-python'), None)
INFO:pipenv.patched.pip._internal.operations.prepare:Collecting opencv-python (from -r /tmp/pipenv-2_o3g79n-requirements/pipenv-5a6vt74x-constraints.txt (line 15))
INFO:pipenv.patched.pip._internal.network.download:Downloading opencv_python-4.11.0.86-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (20 kB)
INFO:pipenv.patched.pip._internal.resolution.resolvelib.reporter:Reporter.adding_requirement(SpecifierRequirement('natsort'), None)
INFO:pipenv.patched.pip._internal.operations.prepare:Collecting natsort (from -r /tmp/pipenv-2_o3g79n-requirements/pipenv-5a6vt74x-constraints.txt (line 13))
INFO:pipenv.patched.pip._internal.network.download:Downloading natsort-8.4.0-py3-none-any.whl.metadata (21 kB)
INFO:pipenv.patched.pip._internal.resolution.resolvelib.reporter:Reporter.adding_requirement(SpecifierRequirement('nltk'), None)
INFO:pipenv.patched.pip._internal.operations.prepare:Collecting nltk (from -r /tmp/pipenv-2_o3g79n-requirements/pipenv-5a6vt74x-constraints.txt (line 16))
INFO:pipenv.patched.pip._internal.network.download:Downloading nltk-3.9.1-py3-none-any.whl.metadata (2.9 kB)
INFO:pipenv.patched.pip._internal.resolution.resolvelib.reporter:Reporter.adding_requirement(SpecifierRequirement('spacy'), None)
INFO:pipenv.patched.pip._internal.operations.prepare:Collecting spacy (from -r /tmp/pipenv-2_o3g79n-requirements/pipenv-5a6vt74x-constraints.txt (line 4))
INFO:pipenv.patched.pip._internal.network.download:Downloading spacy-3.8.2.tar.gz (1.3 MB)
INFO:pipenv.patched.pip._internal.cli.spinners:Installing build dependencies: started
INFO:pipenv.patched.pip._internal.cli.spinners:Installing build dependencies: still running...
INFO:pipenv.patched.pip._internal.cli.spinners:Installing build dependencies: finished with status 'done'
INFO:pipenv.patched.pip._internal.cli.spinners:Getting requirements to build wheel: started
INFO:pipenv.patched.pip._internal.cli.spinners:Getting requirements to build wheel: finished with status 'done'
INFO:pipenv.patched.pip._internal.cli.spinners:Preparing metadata (pyproject.toml): started
INFO:pipenv.patched.pip._internal.cli.spinners:Preparing metadata (pyproject.toml): finished with status 'done'
INFO:pipenv.patched.pip._internal.resolution.resolvelib.reporter:Reporter.adding_requirement(SpecifierRequirement('pandas'), None)
INFO:pipenv.patched.pip._internal.operations.prepare:Collecting pandas (from -r /tmp/pipenv-2_o3g79n-requirements/pipenv-5a6vt74x-constraints.txt (line 8))
INFO:pipenv.patched.pip._internal.network.download:Downloading pandas-2.2.3-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (89 kB)
INFO:pipenv.patched.pip._internal.resolution.resolvelib.reporter:Reporter.adding_requirement(SpecifierRequirement('pillow'), None)
INFO:pipenv.patched.pip._internal.operations.prepare:Collecting pillow (from -r /tmp/pipenv-2_o3g79n-requirements/pipenv-5a6vt74x-constraints.txt (line 12))
INFO:pipenv.patched.pip._internal.network.download:Downloading pillow-11.2.1-cp313-cp313-manylinux_2_28_x86_64.whl.metadata (8.9 kB)
INFO:pipenv.patched.pip._internal.resolution.resolvelib.reporter:Reporter.adding_requirement(SpecifierRequirement('python-magic'), None)
INFO:pipenv.patched.pip._internal.operations.prepare:Collecting python-magic (from -r /tmp/pipenv-2_o3g79n-requirements/pipenv-5a6vt74x-constraints.txt (line 14))
INFO:pipenv.patched.pip._internal.network.download:Downloading python_magic-0.4.27-py2.py3-none-any.whl.metadata (5.8 kB)
INFO:pipenv.patched.pip._internal.resolution.resolvelib.reporter:Reporter.adding_requirement(SpecifierRequirement('numpy'), None)
INFO:pipenv.patched.pip._internal.operations.prepare:Collecting numpy (from -r /tmp/pipenv-2_o3g79n-requirements/pipenv-5a6vt74x-constraints.txt (line 9))
INFO:pipenv.patched.pip._internal.network.download:Downloading numpy-2.2.4-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (62 kB)
INFO:pipenv.patched.pip._internal.resolution.resolvelib.reporter:Reporter.adding_requirement(SpecifierRequirement('requests'), None)
INFO:pipenv.patched.pip._internal.operations.prepare:Collecting requests (from -r /tmp/pipenv-2_o3g79n-requirements/pipenv-5a6vt74x-constraints.txt (line 11))
INFO:pipenv.patched.pip._internal.network.download:Downloading requests-2.32.3-py3-none-any.whl.metadata (4.6 kB)
INFO:pipenv.patched.pip._internal.resolution.resolvelib.reporter:Reporter.adding_requirement(SpecifierRequirement('keras-preprocessing'), None)
INFO:pipenv.patched.pip._internal.operations.prepare:Collecting keras-preprocessing (from -r /tmp/pipenv-2_o3g79n-requirements/pipenv-5a6vt74x-constraints.txt (line 5))
INFO:pipenv.patched.pip._internal.network.download:Downloading Keras_Preprocessing-1.1.2-py2.py3-none-any.whl.metadata (1.9 kB)
INFO:pipenv.patched.pip._internal.resolution.resolvelib.reporter:Reporter.adding_requirement(SpecifierRequirement('scikit-surprise'), None)
INFO:pipenv.patched.pip._internal.operations.prepare:Collecting scikit-surprise (from -r /tmp/pipenv-2_o3g79n-requirements/pipenv-5a6vt74x-constraints.txt (line 18))
INFO:pipenv.patched.pip._internal.network.download:Downloading scikit_surprise-1.1.4.tar.gz (154 kB)
INFO:pipenv.patched.pip._internal.cli.spinners:Installing build dependencies: started
INFO:pipenv.patched.pip._internal.cli.spinners:Installing build dependencies: finished with status 'done'
INFO:pipenv.patched.pip._internal.cli.spinners:Getting requirements to build wheel: started
INFO:pipenv.patched.pip._internal.cli.spinners:Getting requirements to build wheel: finished with status 'error'
ERROR:pip.subprocessor:Getting requirements to build wheel exited with 1
Traceback (most recent call last):
  File "/home/khteh/.local/lib/python3.13/site-packages/pipenv/utils/resolver.py", line 458, in resolve
    results = resolver.resolve(self.constraints, check_supported_wheels=False)
  File "/home/khteh/.local/lib/python3.13/site-packages/pipenv/patched/pip/_internal/resolution/resolvelib/resolver.py", line 95, in resolve
    result = self._result = resolver.resolve(
                            ~~~~~~~~~~~~~~~~^
        collected.requirements, max_rounds=limit_how_complex_resolution_can_be
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/home/khteh/.local/lib/python3.13/site-packages/pipenv/patched/pip/_vendor/resolvelib/resolvers.py", line 546, in resolve
    state = resolution.resolve(requirements, max_rounds=max_rounds)
  File "/home/khteh/.local/lib/python3.13/site-packages/pipenv/patched/pip/_vendor/resolvelib/resolvers.py", line 397, in resolve
    self._add_to_criteria(self.state.criteria, r, parent=None)
    ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/khteh/.local/lib/python3.13/site-packages/pipenv/patched/pip/_vendor/resolvelib/resolvers.py", line 173, in _add_to_criteria
    if not criterion.candidates:
           ^^^^^^^^^^^^^^^^^^^^
  File "/home/khteh/.local/lib/python3.13/site-packages/pipenv/patched/pip/_vendor/resolvelib/structs.py", line 156, in __bool__
    return bool(self._sequence)
  File "/home/khteh/.local/lib/python3.13/site-packages/pipenv/patched/pip/_internal/resolution/resolvelib/found_candidates.py", line 174, in __bool__
    return any(self)
  File "/home/khteh/.local/lib/python3.13/site-packages/pipenv/patched/pip/_internal/resolution/resolvelib/found_candidates.py", line 162, in <genexpr>
    return (c for c in iterator if id(c) not in self._incompatible_ids)
                       ^^^^^^^^
  File "/home/khteh/.local/lib/python3.13/site-packages/pipenv/patched/pip/_internal/resolution/resolvelib/found_candidates.py", line 53, in _iter_built
    candidate = func()
  File "/home/khteh/.local/lib/python3.13/site-packages/pipenv/patched/pip/_internal/resolution/resolvelib/factory.py", line 187, in _make_candidate_from_link
    base: Optional[BaseCandidate] = self._make_base_candidate_from_link(
                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        link, template, name, version
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/home/khteh/.local/lib/python3.13/site-packages/pipenv/patched/pip/_internal/resolution/resolvelib/factory.py", line 233, in _make_base_candidate_from_link
    self._link_candidate_cache = LinkCandidate(
                                       ~~~~~~~~~~~~~^
        link,
        ^^^^^
    ...<3 lines>...
        version=version,
        ^^^^^^^^^^^^^^^^
    )
    ^
  File "/home/khteh/.local/lib/python3.13/site-packages/pipenv/patched/pip/_internal/resolution/resolvelib/candidates.py", line 308, in __init__
    super().__init__(
    ~~~~~~~~~~~~~~~~^
        link=link,
        ^^^^^^^^^^
    ...<4 lines>...
        version=version,
        ^^^^^^^^^^^^^^^^
    )
    ^
  File "/home/khteh/.local/lib/python3.13/site-packages/pipenv/patched/pip/_internal/resolution/resolvelib/candidates.py", line 160, in __init__
    self.dist = self._prepare()
                ~~~~~~~~~~~~~^^
  File "/home/khteh/.local/lib/python3.13/site-packages/pipenv/patched/pip/_internal/resolution/resolvelib/candidates.py", line 237, in _prepare
    dist = self._prepare_distribution()
  File "/home/khteh/.local/lib/python3.13/site-packages/pipenv/patched/pip/_internal/resolution/resolvelib/candidates.py", line 319, in _prepare_distribution
    return preparer.prepare_linked_requirement(self._ireq, parallel_builds=True)
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/khteh/.local/lib/python3.13/site-packages/pipenv/patched/pip/_internal/operations/prepare.py", line 527, in prepare_linked_requirement
    return self._prepare_linked_requirement(req, parallel_builds)
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
  File "/home/khteh/.local/lib/python3.13/site-packages/pipenv/patched/pip/_internal/operations/prepare.py", line 642, in _prepare_linked_requirement
    dist = _get_prepared_distribution(
        req,
    ...<3 lines>...
        self.check_build_deps,
    )
  File "/home/khteh/.local/lib/python3.13/site-packages/pipenv/patched/pip/_internal/operations/prepare.py", line 72, in _get_prepared_distribution
    abstract_dist.prepare_distribution_metadata(
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        finder, build_isolation, check_build_deps
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/home/khteh/.local/lib/python3.13/site-packages/pipenv/patched/pip/_internal/distributions/sdist.py", line 56, in prepare_distribution_metadata
    self._install_build_reqs(finder)
    ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^
  File "/home/khteh/.local/lib/python3.13/site-packages/pipenv/patched/pip/_internal/distributions/sdist.py", line 126, in _install_build_reqs
    build_reqs = self._get_build_requires_wheel()
  File "/home/khteh/.local/lib/python3.13/site-packages/pipenv/patched/pip/_internal/distributions/sdist.py", line 103, in _get_build_requires_wheel
    return backend.get_requires_for_build_wheel()
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/home/khteh/.local/lib/python3.13/site-packages/pipenv/patched/pip/_internal/utils/misc.py", line 701, in get_requires_for_build_wheel
    return super().get_requires_for_build_wheel(config_settings=cs)
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^
  File "/home/khteh/.local/lib/python3.13/site-packages/pipenv/patched/pip/_vendor/pyproject_hooks/_impl.py", line 166, in get_requires_for_build_wheel
    return self._call_hook('get_requires_for_build_wheel', {
           ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        'config_settings': config_settings
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    })
    ^^
  File "/home/khteh/.local/lib/python3.13/site-packages/pipenv/patched/pip/_vendor/pyproject_hooks/_impl.py", line 311, in _call_hook
    self._subprocess_runner(
    ~~~~~~~~~~~~~~~~~~~~~~~^
        ,
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        cwd=self.source_dir,
        ^^^^^^^^^^^^^^^^^^^^
        extra_environ=extra_environ
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/home/khteh/.local/lib/python3.13/site-packages/pipenv/patched/pip/_internal/utils/subprocess.py", line 237, in runner
    call_subprocess(
    ~~~~~~~~~~~~~~~^
        cmd,
        ^^^^
    ...<3 lines>...
        spinner=spinner,
        ^^^^^^^^^^^^^^^^
    )
    ^
  File "/home/khteh/.local/lib/python3.13/site-packages/pipenv/patched/pip/_internal/utils/subprocess.py", line 209, in call_subprocess
    raise error
pipenv.patched.pip._internal.exceptions.InstallationSubprocessError: Getting requirements to build wheel exited with 1
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/home/khteh/.local/lib/python3.13/site-packages/pipenv/resolver.py", line 465, in <module>
    main()
    ~~~~^^
  File "/home/khteh/.local/lib/python3.13/site-packages/pipenv/resolver.py", line 451, in main
    _main(
    ~~~~~^
        parsed.pre,
        ^^^^^^^^^^^
    ...<7 lines>...
        category=parsed.category,
        ^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/home/khteh/.local/lib/python3.13/site-packages/pipenv/resolver.py", line 436, in _main
    resolve_packages(
    ~~~~~~~~~~~~~~~~^
        pre, clear, verbose, system, write, requirements_dir, packages, category
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/home/khteh/.local/lib/python3.13/site-packages/pipenv/resolver.py", line 400, in resolve_packages
    results, resolver = resolve_deps(
                        ~~~~~~~~~~~~^
        packages,
        ^^^^^^^^^
    ...<7 lines>...
        req_dir=requirements_dir,
        ^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/home/khteh/.local/lib/python3.13/site-packages/pipenv/utils/resolver.py", line 967, in resolve_deps
    results, hashes, internal_resolver = actually_resolve_deps(
                                         ~~~~~~~~~~~~~~~~~~~~~^
        deps,
        ^^^^^
    ...<7 lines>...
        req_dir=req_dir,
        ^^^^^^^^^^^^^^^^
    )
    ^
  File "/home/khteh/.local/lib/python3.13/site-packages/pipenv/utils/resolver.py", line 735, in actually_resolve_deps
    resolver.resolve()
    ~~~~~~~~~~~~~~~~^^
  File "/home/khteh/.local/lib/python3.13/site-packages/pipenv/utils/resolver.py", line 460, in resolve
    raise ResolutionFailure(message=e)
pipenv.exceptions.ResolutionFailure: ERROR: Getting requirements to build wheel exited with 1
✘ Locking Failed!
Your dependencies could not be resolved. You likely have a mismatch in your sub-dependencies.
You can use $ pipenv run pip install <requirement_name> to bypass this mechanism, then run $ pipenv graph to inspect the versions actually installed in the virtualenv.
Hint: try $ pipenv lock --pre if it is a pre-release dependency.
ERROR: Failed to lock Pipfile.lock!
$ pipenv --version
pipenv, version 2024.4.1
$ python --version
Python 3.13.3
$ pip --version
pip 25.0.1 from /home/khteh/.local/lib/python3.13/site-packages/pip (python 3.13)

Expected result

No error
Describe what you expected.

Actual result

When possible, provide the verbose output (--verbose), especially for locking and dependencies resolving issues.

Steps to replicate

Provide the steps to replicate (which usually at least includes the commands and the Pipfile).


Please run $ pipenv --support, and paste the results here. Don't put backticks (`) around it! The output already contains Markdown formatting.

$ pipenv --support

Pipenv version: '2024.4.1'

Pipenv location: '/home/khteh/.local/lib/python3.13/site-packages/pipenv'

Python location: '/usr/bin/python3'

OS Name: 'posix'

User pip version: '24.3.1'

user Python installations found:

PEP 508 Information:

{'implementation_name': 'cpython',
 'implementation_version': '3.13.3',
 'os_name': 'posix',
 'platform_machine': 'x86_64',
 'platform_python_implementation': 'CPython',
 'platform_release': '6.14.0-15-generic',
 'platform_system': 'Linux',
 'platform_version': '#15-Ubuntu SMP PREEMPT_DYNAMIC Sun Apr  6 15:05:05 UTC '
                     '2025',
 'python_full_version': '3.13.3',
 'python_version': '3.13',
 'sys_platform': 'linux'}

System environment variables:

  • SHELL
  • SESSION_MANAGER
  • TBBROOT
  • QT_ACCESSIBILITY
  • COLORTERM
  • XDG_CONFIG_DIRS
  • XDG_MENU_PREFIX
  • GNOME_DESKTOP_SESSION_ID
  • ONEAPI_ROOT
  • DERBY_HOME
  • PKG_CONFIG_PATH
  • LANGUAGE
  • ADVISOR_2025_DIR
  • LC_ADDRESS
  • JAVA_HOME
  • GNOME_SHELL_SESSION_MODE
  • LC_NAME
  • SSH_AUTH_SOCK
  • CCL_ROOT
  • I_MPI_ROOT
  • MEMORY_PRESSURE_WRITE
  • XMODIFIERS
  • DESKTOP_SESSION
  • LC_MONETARY
  • FI_PROVIDER_PATH
  • DNNLROOT
  • DIAGUTIL_PATH
  • GTK_MODULES
  • PWD
  • CCL_CONFIGURATION
  • XDG_SESSION_DESKTOP
  • LOGNAME
  • DPL_ROOT
  • XDG_SESSION_TYPE
  • MANPATH
  • SYSTEMD_EXEC_PID
  • TCM_ROOT
  • XAUTHORITY
  • J2REDIR
  • HOME
  • USERNAME
  • IM_CONFIG_PHASE
  • GDB_INFO
  • CCL_CONFIGURATION_PATH
  • LC_PAPER
  • LANG
  • LS_COLORS
  • XDG_CURRENT_DESKTOP
  • MEMORY_PRESSURE_WATCH
  • VTE_VERSION
  • WAYLAND_DISPLAY
  • SETVARS_COMPLETED
  • APM
  • CMAKE_PREFIX_PATH
  • GNOME_TERMINAL_SCREEN
  • CMPLR_ROOT
  • DOTNET_BUNDLE_EXTRACT_BASE_DIR
  • Pti_DIR
  • INFOPATH
  • IPPROOT
  • GNOME_SETUP_DISPLAY
  • IPP_TARGET_ARCH
  • LESSCLOSE
  • XDG_SESSION_CLASS
  • PYTHONPATH
  • TERM
  • LC_IDENTIFICATION
  • J2SDKDIR
  • DALROOT
  • LESSOPEN
  • USER
  • UMF_ROOT
  • LIBRARY_PATH
  • DAL_MAJOR_BINARY
  • GNOME_TERMINAL_SERVICE
  • IPPCRYPTOROOT
  • DISPLAY
  • IPPCP_TARGET_ARCH
  • SHLVL
  • GSM_SKIP_SSH_AGENT_WORKAROUND
  • LC_TELEPHONE
  • QT_IM_MODULE
  • OCL_ICD_FILENAMES
  • LC_MEASUREMENT
  • PAPERSIZE
  • CLASSPATH
  • LD_LIBRARY_PATH
  • VTUNE_PROFILER_DIR
  • XDG_RUNTIME_DIR
  • MKLROOT
  • DEBUGINFOD_URLS
  • LC_TIME
  • DAL_MINOR_BINARY
  • VTUNE_PROFILER_2025_DIR
  • XDG_DATA_DIRS
  • NLSPATH
  • PATH
  • GDMSESSION
  • INTEL_PYTHONHOME
  • DBUS_SESSION_BUS_ADDRESS
  • CPATH
  • LC_NUMERIC
  • _
  • PIP_DISABLE_PIP_VERSION_CHECK
  • PYTHONDONTWRITEBYTECODE
  • PYTHONFINDER_IGNORE_UNSUPPORTED

Pipenv–specific environment variables:

Debug–specific environment variables:

  • PATH: /home/khteh/.yarn/bin:/home/khteh/.config/yarn/global/node_modules/.bin:/home/khteh/.pub-cache/bin:/home/khteh/.local/bin:/home/khteh/.pub-cache/bin:/opt/intel/oneapi/vtune/2025.0/bin64:/opt/intel/oneapi/mpi/2021.14/bin:/opt/intel/oneapi/mkl/2025.0/bin:/opt/intel/oneapi/dpcpp-ct/2025.0/bin:/opt/intel/oneapi/dev-utilities/2025.0/bin:/opt/intel/oneapi/debugger/2025.0/opt/debugger/bin:/opt/intel/oneapi/compiler/2025.0/bin:/opt/intel/oneapi/advisor/2025.0/bin64:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/opt/go:/opt/td-agent/bin:/opt/neo4j:/snap/bin:/home/khteh/.dotnet/tools:/usr/lib/jvm/jdk-21-oracle-x64/bin:/usr/lib/jvm/jdk-21-oracle/db/bin
  • SHELL: /bin/bash
  • LANG: en_US.UTF-8
  • PWD: /home/khteh

@khteh khteh changed the title pipenv failed to lock Pipfile.lock with ERROR: pip subprocess to install build dependencies exited with 1 pipenv failed to lock Pipfile.lock with ERROR: pip subprocess to install build dependencies exited with 1 Apr 19, 2025
@matteius
Copy link
Member

Which dependency were you trying to install? Seems it requires some system level thing you are missing to build the sdist.

@khteh
Copy link
Author

khteh commented Apr 20, 2025

It seems to be scikit-surprise from the log. Which system-level thing missing?

@matteius
Copy link
Member

You can use $ pipenv run pip install <requirement_name> to bypass this mechanism, then run $ pipenv graph to inspect the versions actually installed in the virtualenv.

Running the pipenv run pip install sckit-surprise should give additional details.

@khteh
Copy link
Author

khteh commented Apr 21, 2025

Collecting scikit-surprise
  Downloading scikit_surprise-1.1.4.tar.gz (154 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error
  
  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [45 lines of output]
      
      Error compiling Cython file:
      ------------------------------------------------------------
      ...
              self.avg_cltr_i = avg_cltr_i
              self.avg_cocltr = avg_cocltr
      
              return self
      
          def compute_averages(self, np.ndarray[np.int_t] cltr_u,
                                                   ^
      ------------------------------------------------------------
      
      surprise/prediction_algorithms/co_clustering.pyx:157:45: Invalid type.
      Compiling surprise/similarities.pyx because it changed.
      Compiling surprise/prediction_algorithms/matrix_factorization.pyx because it changed.
      Compiling surprise/prediction_algorithms/optimize_baselines.pyx because it changed.
      Compiling surprise/prediction_algorithms/slope_one.pyx because it changed.
      Compiling surprise/prediction_algorithms/co_clustering.pyx because it changed.
      [1/5] Cythonizing surprise/prediction_algorithms/co_clustering.pyx
      Traceback (most recent call last):
        File "/home/khteh/.local/share/virtualenvs/pAIthon-GaqEDHQT/lib/python3.13/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 389, in <module>
          main()
          ~~~~^^
        File "/home/khteh/.local/share/virtualenvs/pAIthon-GaqEDHQT/lib/python3.13/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 373, in main
          json_out["return_val"] = hook(**hook_input["kwargs"])
                                   ~~~~^^^^^^^^^^^^^^^^^^^^^^^^
        File "/home/khteh/.local/share/virtualenvs/pAIthon-GaqEDHQT/lib/python3.13/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 143, in get_requires_for_build_wheel
          return hook(config_settings)
        File "/tmp/pip-build-env-vsfd4x9u/overlay/lib/python3.13/site-packages/setuptools/build_meta.py", line 331, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=[])
                 ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-vsfd4x9u/overlay/lib/python3.13/site-packages/setuptools/build_meta.py", line 301, in _get_build_requires
          self.run_setup()
          ~~~~~~~~~~~~~~^^
        File "/tmp/pip-build-env-vsfd4x9u/overlay/lib/python3.13/site-packages/setuptools/build_meta.py", line 317, in run_setup
          exec(code, locals())
          ~~~~^^^^^^^^^^^^^^^^
        File "<string>", line 116, in <module>
        File "/tmp/pip-build-env-vsfd4x9u/overlay/lib/python3.13/site-packages/Cython/Build/Dependencies.py", line 1154, in cythonize
          cythonize_one(*args)
          ~~~~~~~~~~~~~^^^^^^^
        File "/tmp/pip-build-env-vsfd4x9u/overlay/lib/python3.13/site-packages/Cython/Build/Dependencies.py", line 1321, in cythonize_one
          raise CompileError(None, pyx_file)
      Cython.Compiler.Errors.CompileError: surprise/prediction_algorithms/co_clustering.pyx
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel 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.

@matteius
Copy link
Member

yes, until you resolve the system dependencies that you could build that package with pip, you'll have the same problem with pipenv. Please look into the build requirements of that specific package: https://pypi.org/project/scikit-surprise/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants