Skip to content

Install fails with recent python/pip versions #2

@hmeine

Description

@hmeine

I am using python 3.12.10 and pip 25.0.1, and for me pip install fails with this error:

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [25 lines of output]
      Traceback (most recent call last):
        File "/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 389, in <module>
          main()
        File "/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 373, in main
          json_out["return_val"] = hook(**hook_input["kwargs"])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 143, in get_requires_for_build_wheel
          return hook(config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/vd/z8g1y2yn2j78c3fx0_mqsbdc0000gn/T/pip-build-env-0_4n8twm/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 331, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=[])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/vd/z8g1y2yn2j78c3fx0_mqsbdc0000gn/T/pip-build-env-0_4n8twm/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 301, in _get_build_requires
          self.run_setup()
        File "/private/var/folders/vd/z8g1y2yn2j78c3fx0_mqsbdc0000gn/T/pip-build-env-0_4n8twm/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 512, in run_setup
          super().run_setup(setup_script=setup_script)
        File "/private/var/folders/vd/z8g1y2yn2j78c3fx0_mqsbdc0000gn/T/pip-build-env-0_4n8twm/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 317, in run_setup
          exec(code, locals())
        File "<string>", line 4, in <module>
        File "/private/var/folders/vd/z8g1y2yn2j78c3fx0_mqsbdc0000gn/T/pip-install-ym6fwq2_/tr064_9e922d691c25457d8b5b89a8c50d2bd5/tr064/__init__.py", line 2, in <module>
          from .client import Client          # NOQA
          ^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/vd/z8g1y2yn2j78c3fx0_mqsbdc0000gn/T/pip-install-ym6fwq2_/tr064_9e922d691c25457d8b5b89a8c50d2bd5/tr064/client.py", line 9, in <module>
          import lxml.etree as ET
      ModuleNotFoundError: No module named 'lxml'
      [end of output]

The problem seem to be that setup.py imports tr064 in order to be able to set version=tr064.__version__. (Also note that the problem is independent of whether one has lxml installed or not; apparently the wheel building process uses an isolated environment.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions