uv icon indicating copy to clipboard operation
uv copied to clipboard

Packages that fail to install under PEP 517 with build isolation

Open charliermarsh opened this issue 1 year ago • 21 comments

I don't know that an issue is the right home for this, but I want to track the packages we know can't be installed under PEP 517 when build isolation is enforced. In all cases, these packages also fail under pip install --use-pep517.

charliermarsh avatar Mar 06 '24 22:03 charliermarsh

playsound

❯ pip install -e . --use-pep517
Obtaining file:///Users/crmarsh/workspace/puffin/playsound
  Installing build dependencies ... done
  Checking if build backend supports build_editable ... done
  Getting requirements to build editable ... error
  error: subprocess-exited-with-error

  × Getting requirements to build editable did not run successfully.
  │ exit code: 1
  ╰─> [31 lines of output]
      Traceback (most recent call last):
        File "/Users/crmarsh/.local/share/rtx/installs/python/3.12.1/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/Users/crmarsh/.local/share/rtx/installs/python/3.12.1/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/Users/crmarsh/.local/share/rtx/installs/python/3.12.1/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 132, in get_requires_for_build_editable
          return hook(config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/nt/6gf2v7_s3k13zq_t3944rwz40000gn/T/pip-build-env-n_6uhe_d/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 448, in get_requires_for_build_editable
          return self.get_requires_for_build_wheel(config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/nt/6gf2v7_s3k13zq_t3944rwz40000gn/T/pip-build-env-n_6uhe_d/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 325, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/nt/6gf2v7_s3k13zq_t3944rwz40000gn/T/pip-build-env-n_6uhe_d/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 295, in _get_build_requires
          self.run_setup()
        File "/private/var/folders/nt/6gf2v7_s3k13zq_t3944rwz40000gn/T/pip-build-env-n_6uhe_d/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 487, in run_setup
          super().run_setup(setup_script=setup_script)
        File "/private/var/folders/nt/6gf2v7_s3k13zq_t3944rwz40000gn/T/pip-build-env-n_6uhe_d/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 311, in run_setup
          exec(code, locals())
        File "<string>", line 6, in <module>
        File "/Users/crmarsh/.local/share/rtx/installs/python/3.12.1/lib/python3.12/inspect.py", line 1282, in getsource
          lines, lnum = getsourcelines(object)
                        ^^^^^^^^^^^^^^^^^^^^^^
        File "/Users/crmarsh/.local/share/rtx/installs/python/3.12.1/lib/python3.12/inspect.py", line 1264, in getsourcelines
          lines, lnum = findsource(object)
                        ^^^^^^^^^^^^^^^^^^
        File "/Users/crmarsh/.local/share/rtx/installs/python/3.12.1/lib/python3.12/inspect.py", line 1093, in findsource
          raise OSError('could not get source code')
      OSError: could not get source code
      [end of output]

charliermarsh avatar Mar 06 '24 22:03 charliermarsh

Prior versions of fastText failed, but were fixed in https://github.com/facebookresearch/fastText/commit/de458ddea42327cf314e69f9eef40d0ec02705ab.

However, the most recent published version (v0.9.2) does fail:

❯ pip install -e . --use-pep517
Obtaining file:///Users/crmarsh/workspace/puffin/fastText
  Installing build dependencies ... done
  Checking if build backend supports build_editable ... done
  Getting requirements to build editable ... error
  error: subprocess-exited-with-error

  × Getting requirements to build editable did not run successfully.
  │ exit code: 1
  ╰─> [31 lines of output]
      /Users/crmarsh/.local/share/rtx/installs/python/3.12.1/bin/python3.12: No module named pip
      Traceback (most recent call last):
        File "<string>", line 38, in __init__
      ModuleNotFoundError: No module named 'pybind11'

      During handling of the above exception, another exception occurred:

      Traceback (most recent call last):
        File "/Users/crmarsh/.local/share/rtx/installs/python/3.12.1/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/Users/crmarsh/.local/share/rtx/installs/python/3.12.1/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/Users/crmarsh/.local/share/rtx/installs/python/3.12.1/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 132, in get_requires_for_build_editable
          return hook(config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/nt/6gf2v7_s3k13zq_t3944rwz40000gn/T/pip-build-env-vc8gsuu6/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 448, in get_requires_for_build_editable
          return self.get_requires_for_build_wheel(config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/nt/6gf2v7_s3k13zq_t3944rwz40000gn/T/pip-build-env-vc8gsuu6/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 325, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/nt/6gf2v7_s3k13zq_t3944rwz40000gn/T/pip-build-env-vc8gsuu6/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 295, in _get_build_requires
          self.run_setup()
        File "/private/var/folders/nt/6gf2v7_s3k13zq_t3944rwz40000gn/T/pip-build-env-vc8gsuu6/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 487, in run_setup
          super().run_setup(setup_script=setup_script)
        File "/private/var/folders/nt/6gf2v7_s3k13zq_t3944rwz40000gn/T/pip-build-env-vc8gsuu6/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 311, in run_setup
          exec(code, locals())
        File "<string>", line 72, in <module>
        File "<string>", line 41, in __init__
      RuntimeError: pybind11 install failed.
      [end of output]

charliermarsh avatar Mar 06 '24 22:03 charliermarsh

chumpy

❯ pip install -e . --use-pep517
Obtaining file:///Users/crmarsh/workspace/puffin/chumpy
  Installing build dependencies ... done
  Checking if build backend supports build_editable ... done
  Getting requirements to build editable ... error
  error: subprocess-exited-with-error

  × Getting requirements to build editable did not run successfully.
  │ exit code: 1
  ╰─> [29 lines of output]
      Traceback (most recent call last):
        File "<string>", line 9, in <module>
      ModuleNotFoundError: No module named 'pip'

      During handling of the above exception, another exception occurred:

      Traceback (most recent call last):
        File "/Users/crmarsh/.local/share/rtx/installs/python/3.12.1/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/Users/crmarsh/.local/share/rtx/installs/python/3.12.1/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/Users/crmarsh/.local/share/rtx/installs/python/3.12.1/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 132, in get_requires_for_build_editable
          return hook(config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/nt/6gf2v7_s3k13zq_t3944rwz40000gn/T/pip-build-env-31a60nip/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 448, in get_requires_for_build_editable
          return self.get_requires_for_build_wheel(config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/nt/6gf2v7_s3k13zq_t3944rwz40000gn/T/pip-build-env-31a60nip/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 325, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/nt/6gf2v7_s3k13zq_t3944rwz40000gn/T/pip-build-env-31a60nip/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 295, in _get_build_requires
          self.run_setup()
        File "/private/var/folders/nt/6gf2v7_s3k13zq_t3944rwz40000gn/T/pip-build-env-31a60nip/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 487, in run_setup
          super().run_setup(setup_script=setup_script)
        File "/private/var/folders/nt/6gf2v7_s3k13zq_t3944rwz40000gn/T/pip-build-env-31a60nip/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 311, in run_setup
          exec(code, locals())
        File "<string>", line 11, in <module>
      ModuleNotFoundError: No module named 'pip'
      [end of output]

This also causes ViTPose to fail.

charliermarsh avatar Mar 06 '24 22:03 charliermarsh

I have problems with xformers by Meta (see issue). I even tried with latest uv without build isolation:

❯ uv pip install setuptools torch numpy
Resolved 11 packages in 2ms
Installed 1 package in 23ms
 + numpy==1.26.4

❯ uv pip install xformers --no-build-isolation
Resolved 11 packages in 2ms
error: Failed to download distributions
  Caused by: Failed to fetch wheel: xformers==0.0.24
  Caused by: Failed to build: xformers==0.0.24
  Caused by: Build backend failed to build wheel through `build_wheel()` with exit status: 1
--- stdout:

--- stderr:
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
   or: setup.py --help [cmd1 cmd2 ...]
   or: setup.py --help-commands
   or: setup.py cmd --help

error: invalid command 'bdist_wheel'

baggiponte avatar Mar 08 '24 08:03 baggiponte

@baggiponte -- I think you need to install wheel as well -- that's the trace you get when you're missing wheel (e.g., uv pip install wheel).

charliermarsh avatar Mar 08 '24 15:03 charliermarsh

@baggiponte -- I think you need to install wheel as well -- that's the trace you get when you're missing wheel (e.g., uv pip install wheel).

That solves it - then I get weird C errors but definitely not uv-related.

Do you think uv should automatically recommend this kind of suggestions? A bit like the Rust compiler, that has wonderfully helpful error messages.

baggiponte avatar Mar 08 '24 18:03 baggiponte

Yeah we should add a nice message for “missing wheel”. We have that for a few other failures. \cc @konstin

charliermarsh avatar Mar 08 '24 18:03 charliermarsh

youtokentome at least as of f4162d846057a3118222ca04a01b84297eb8a8db.

❯ pip install youtokentome --use-pep517
Collecting youtokentome
  Downloading youtokentome-1.0.6.tar.gz (86 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 86.7/86.7 kB 3.5 MB/s eta 0:00:00
  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
  ╰─> [20 lines of output]
      Traceback (most recent call last):
        File "/Users/crmarsh/.local/share/rtx/installs/python/3.12.2/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/Users/crmarsh/.local/share/rtx/installs/python/3.12.2/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/Users/crmarsh/.local/share/rtx/installs/python/3.12.2/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/nt/6gf2v7_s3k13zq_t3944rwz40000gn/T/pip-build-env-xop9lly4/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 325, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/nt/6gf2v7_s3k13zq_t3944rwz40000gn/T/pip-build-env-xop9lly4/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 295, in _get_build_requires
          self.run_setup()
        File "/private/var/folders/nt/6gf2v7_s3k13zq_t3944rwz40000gn/T/pip-build-env-xop9lly4/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 487, in run_setup
          super().run_setup(setup_script=setup_script)
        File "/private/var/folders/nt/6gf2v7_s3k13zq_t3944rwz40000gn/T/pip-build-env-xop9lly4/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 311, in run_setup
          exec(code, locals())
        File "<string>", line 5, in <module>
      ModuleNotFoundError: No module named 'Cython'
      [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.

charliermarsh avatar Apr 10 '24 13:04 charliermarsh

pytorch-fast-transformers though perhaps intentional since it requires PyTorch at build time.

❯ pip install pytorch-fast-transformers --use-pep517
Collecting pytorch-fast-transformers
  Downloading pytorch-fast-transformers-0.4.0.tar.gz (93 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 93.6/93.6 kB 4.2 MB/s eta 0:00:00
  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
  ╰─> [26 lines of output]
      Traceback (most recent call last):
        File "<string>", line 19, in <module>
      ModuleNotFoundError: No module named 'torch'

      The above exception was the direct cause of the following exception:

      Traceback (most recent call last):
        File "/Users/crmarsh/.local/share/rtx/installs/python/3.12.1/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/Users/crmarsh/.local/share/rtx/installs/python/3.12.1/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/Users/crmarsh/.local/share/rtx/installs/python/3.12.1/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/nt/6gf2v7_s3k13zq_t3944rwz40000gn/T/pip-build-env-wn0uzfrt/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 325, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/nt/6gf2v7_s3k13zq_t3944rwz40000gn/T/pip-build-env-wn0uzfrt/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 295, in _get_build_requires
          self.run_setup()
        File "/private/var/folders/nt/6gf2v7_s3k13zq_t3944rwz40000gn/T/pip-build-env-wn0uzfrt/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 487, in run_setup
          super().run_setup(setup_script=setup_script)
        File "/private/var/folders/nt/6gf2v7_s3k13zq_t3944rwz40000gn/T/pip-build-env-wn0uzfrt/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 311, in run_setup
          exec(code, locals())
        File "<string>", line 22, in <module>
      ImportError: PyTorch is required to install pytorch-fast-transformers. Please install your favorite version of PyTorch, we support 1.3.1, 1.5.0 and >=1.6
      [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.

charliermarsh avatar Apr 11 '24 14:04 charliermarsh

cchardet which doesn't work on Py311 out of the box, but does work on Py311 with cython installed.

~But pip --pep517 still works, uv doesn't (maybe because the package has no pyproject.toml?)~

$ uv venv .venv --seed
$ .venv/bin/pip install cython==3.0.0
$ .venv/bin/pip install cchardet==2.1.7 --use-pep517

~succeeds~ fails with a cold cache. Succeeds without --use-pep517. then uv:

$ uv venv .venv
$ uv pip install --python .venv/bin/python cython==3.0.0
$ uv pip install --python .venv/bin/python cchardet==2.1.7

fails.

~LMK if, because pip does handle this, it belongs in a new issue~

thejcannon avatar May 23 '24 19:05 thejcannon

pip install cchardet==2.1.7 --use-pep517 does not work for me actually.

charliermarsh avatar May 23 '24 19:05 charliermarsh

❯ python -m pip install cchardet==2.1.7 --use-pep517
Collecting cchardet==2.1.7
  Using cached cchardet-2.1.7.tar.gz (653 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: cchardet
  Building wheel for cchardet (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for cchardet (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [23 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.macosx-14.2-arm64-cpython-311
      creating build/lib.macosx-14.2-arm64-cpython-311/cchardet
      copying src/cchardet/version.py -> build/lib.macosx-14.2-arm64-cpython-311/cchardet
      copying src/cchardet/__init__.py -> build/lib.macosx-14.2-arm64-cpython-311/cchardet
      running build_ext
      building 'cchardet._cchardet' extension
      creating build/temp.macosx-14.2-arm64-cpython-311
      creating build/temp.macosx-14.2-arm64-cpython-311/src
      creating build/temp.macosx-14.2-arm64-cpython-311/src/cchardet
      creating build/temp.macosx-14.2-arm64-cpython-311/src/ext
      creating build/temp.macosx-14.2-arm64-cpython-311/src/ext/uchardet
      creating build/temp.macosx-14.2-arm64-cpython-311/src/ext/uchardet/src
      creating build/temp.macosx-14.2-arm64-cpython-311/src/ext/uchardet/src/LangModels
      clang -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/opt/homebrew/opt/openssl@3include -Isrc/ext/uchardet/src -I/Users/crmarsh/.local/share/rtx/installs/python/3.11.8/include/python3.11 -c src/cchardet/_cchardet.cpp -o build/temp.macosx-14.2-arm64-cpython-311/src/cchardet/_cchardet.o
      src/cchardet/_cchardet.cpp:196:12: fatal error: 'longintrepr.h' file not found
        #include "longintrepr.h"
                 ^~~~~~~~~~~~~~~
      1 error generated.
      error: command '/usr/bin/clang' failed with exit code 1
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for cchardet
Failed to build cchardet
ERROR: Could not build wheels for cchardet, which is required to install pyproject.toml-based projects

charliermarsh avatar May 23 '24 19:05 charliermarsh

Ahhhhhhh I'm like 90% certain pip pulled it from its cache on my box. 😅

EDIT: Yeah this fails: .venv/bin/pip install cchardet==2.1.7 --use-pep517 --no-cache

thejcannon avatar May 23 '24 19:05 thejcannon

https://pypi.org/project/biopython/

https://github.com/astral-sh/uv/issues/4069#issuecomment-2186762048

Edit: fixed in https://github.com/biopython/biopython/pull/4749

covracer avatar Jun 24 '24 14:06 covracer

OpenCC

❯ pip install --use-pep517 git+https://github.com/BYVoid/[email protected]
Collecting git+https://github.com/BYVoid/[email protected]
  Cloning https://github.com/BYVoid/OpenCC.git (to revision ver.1.1.7) to /private/var/folders/nt/6gf2v7_s3k13zq_t3944rwz40000gn/T/pip-req-build-lz7b4_dp
  Running command git clone --filter=blob:none --quiet https://github.com/BYVoid/OpenCC.git /private/var/folders/nt/6gf2v7_s3k13zq_t3944rwz40000gn/T/pip-req-build-lz7b4_dp
  Running command git checkout -q e5d6c5f1b78e28a5797e7ad3ede3513314e544b7
  Resolved https://github.com/BYVoid/OpenCC.git to commit e5d6c5f1b78e28a5797e7ad3ede3513314e544b7
  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
  ╰─> [20 lines of output]
      Traceback (most recent call last):
        File "/Users/crmarsh/.local/share/rtx/installs/python/3.12.3/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/Users/crmarsh/.local/share/rtx/installs/python/3.12.3/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/Users/crmarsh/.local/share/rtx/installs/python/3.12.3/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/nt/6gf2v7_s3k13zq_t3944rwz40000gn/T/pip-build-env-mnle05bg/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 327, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=[])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/nt/6gf2v7_s3k13zq_t3944rwz40000gn/T/pip-build-env-mnle05bg/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 297, in _get_build_requires
          self.run_setup()
        File "/private/var/folders/nt/6gf2v7_s3k13zq_t3944rwz40000gn/T/pip-build-env-mnle05bg/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 497, in run_setup
          super().run_setup(setup_script=setup_script)
        File "/private/var/folders/nt/6gf2v7_s3k13zq_t3944rwz40000gn/T/pip-build-env-mnle05bg/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 313, in run_setup
          exec(code, locals())
        File "<string>", line 9, in <module>
      ModuleNotFoundError: No module named 'wheel'
      [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.

charliermarsh avatar Jul 08 '24 13:07 charliermarsh

Is the solution to just pip install?

amanmibra avatar Jul 29 '24 07:07 amanmibra

@amanmibra -- The solution is generally to do something like:

uv venv
uv pip install torch setuptools
uv pip install --no-build-isolation ${package}

I.e., you create a virtual environment, "manually" install any build dependencies, then install the package in question with --no-build-isolation, so that it's built in your virtual environment and has access to the installed dependencies.

charliermarsh avatar Jul 29 '24 14:07 charliermarsh

What's the uv logic for building packages with no pyproject.toml? (asking in light of #5551 - wondering if uv should just assume a very specific old version of setuptools... I don't know what pip does)

astrojuanlu avatar Jul 29 '24 16:07 astrojuanlu

@astrojuanlu The default backend is defined here: https://github.com/astral-sh/uv/blob/194904b34023a71b749b14f311e2151b3c53750d/crates/uv-build/src/lib.rs#L69-L76

edmorley avatar Jul 29 '24 17:07 edmorley

Adding BoltzTraP2: https://github.com/astral-sh/uv/issues/5816

charliermarsh avatar Aug 06 '24 20:08 charliermarsh

@amanmibra -- The solution is generally to do something like:

uv venv
uv pip install torch setuptools
uv pip install --no-build-isolation ${package}

I.e., you create a virtual environment, "manually" install any build dependencies, then install the package in question with --no-build-isolation, so that it's built in your virtual environment and has access to the installed dependencies.

@charliermarsh Is there a similar workaround for uv pip compile? I landed here by googling error when trying to install torch and trorch-cluster. Am I supposed to put torch in the requirements.in, and then install from the output requirements.txt + torch-cluster ?

# requirements.in
foo
bar
...
torch
$ uv pip compile requirements.in --output-file requirements.txt
$ uv pip sync requirements.txt
$ uv pip install torch-cluster

FCamborda avatar Aug 14 '24 16:08 FCamborda