Skip to content

[Bug] Cannnot install TVM python package when using uv pip from astral #17667

Description

@mshr-h

It worked fine on older versions of TVM (something like from a few weeks ago), but it's not working now. I don't have time to investigate it at the moment so I'm posting the issue for now.

TODOs:

Expected behavior

TVM is installed without any error.

Actual behavior

Traceback (most recent call last):
  File "<string>", line 140, in config_cython
ModuleNotFoundError: No module named 'Cython'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 14, in <module>
  File "/home/ubuntu/.cache/uv/builds-v0/.tmp3yeZdo/lib/python3.11/site-packages/setuptools/build_meta.py", line 483, in get_requires_for_build_editable
    return self.get_requires_for_build_wheel(config_settings)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ubuntu/.cache/uv/builds-v0/.tmp3yeZdo/lib/python3.11/site-packages/setuptools/build_meta.py", line 334, in get_requires_for_build_wheel
    return self._get_build_requires(config_settings, requirements=[])
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ubuntu/.cache/uv/builds-v0/.tmp3yeZdo/lib/python3.11/site-packages/setuptools/build_meta.py", line 304, in _get_build_requires
    self.run_setup()
  File "/home/ubuntu/.cache/uv/builds-v0/.tmp3yeZdo/lib/python3.11/site-packages/setuptools/build_meta.py", line 522, in run_setup
    super().run_setup(setup_script=setup_script)
  File "/home/ubuntu/.cache/uv/builds-v0/.tmp3yeZdo/lib/python3.11/site-packages/setuptools/build_meta.py", line 320, in run_setup
    exec(code, locals())
  File "<string>", line 260, in <module>
  File "<string>", line 181, in config_cython
RuntimeError: Cython is not installed, please pip install cython

hint: This usually indicates a problem with the package or the build environment.

Environment

  • OS: Ubuntu 24.04
  • Python 3.11
  • uv 0.6.2
  • TVM@bbd77ace31a379407c48a38e9db6e86736521509

Steps to reproduce

mkdir tvm_work
cd tvm_work
uv venv --python=3.11
source .venv/bin/activate
uv pip install cmake ninja cython setuptools
git clone --recursive https://github.com/apache/tvm
cd tvm
cmake -S . -B build -G Ninja -DUSE_LLVM=llvm-config
cmake --build build
uv pip install -e python --config-setting editable-mode=compat

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions