Trouble installing with uv on python 3.10 and above
Closed this issue · 0 comments
keller-mark commented
Describe the bug
Hi, I am having trouble installing spatialdata
in a fresh uv
project with python v3.12.
To Reproduce
Steps to reproduce the behavior:
export UV_PYTHON="3.12"
uv init
uv add 'spatialdata==0.2.3'
echo 'from spatialdata import SpatialData' | uv run -
This can be reproduced on GitHub Actions in a fresh repository at https://github.com/keller-mark/spatialdata-uv-install-test/blob/main/.github/workflows/test.yml#L27
For example in this run, only python 3.9 worked, but 3.10 and 3.11/12 had different errors https://github.com/keller-mark/spatialdata-uv-install-test/actions/runs/11616358519
The 3.10 has an error related to xarray:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/runner/work/spatialdata-uv-install-test/spatialdata-uv-install-test/.venv/lib/python3.10/site-packages/spatialdata/__init__.py", line 54, in <module>
from spatialdata import dataloader, datasets, models, transformations
File "/home/runner/work/spatialdata-uv-install-test/spatialdata-uv-install-test/.venv/lib/python3.10/site-packages/spatialdata/datasets.py", line 13, in <module>
from datatree import DataTree
File "/home/runner/work/spatialdata-uv-install-test/spatialdata-uv-install-test/.venv/lib/python3.10/site-packages/datatree/__init__.py", line 2, in <module>
from .datatree import DataTree
File "/home/runner/work/spatialdata-uv-install-test/spatialdata-uv-install-test/.venv/lib/python3.10/site-packages/datatree/datatree.py", line 33, in <module>
from xarray.core.utils import (
ImportError: cannot import name 'HybridMappingProxy' from 'xarray.core.utils' (/home/runner/work/spatialdata-uv-install-test/spatialdata-uv-install-test/.venv/lib/python3.10/site-packages/xarray/core/utils.py)
While 3.11 and 3.12 have an error related to llvmlite (perhaps related to numba):
error: Failed to prepare distributions
Caused by: Failed to download and build `llvmlite==0.36.0`
Caused by: Build backend failed to determine requirements with `build_wheel()` (exit status: 1)
[stderr]
Traceback (most recent call last):
File "<string>", line 14, in <module>
File "/home/runner/work/_temp/setup-uv-cache/builds-v0/.tmpFfMm5Q/lib/python3.11/site-packages/setuptools/build_meta.py", line 333, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=[])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/work/_temp/setup-uv-cache/builds-v0/.tmpFfMm5Q/lib/python3.11/site-packages/setuptools/build_meta.py", line 303, in _get_build_requires
self.run_setup()
File "/home/runner/work/_temp/setup-uv-cache/builds-v0/.tmpFfMm5Q/lib/python3.11/site-packages/setuptools/build_meta.py", line 521, in run_setup
super().run_setup(setup_script=setup_script)
File "/home/runner/work/_temp/setup-uv-cache/builds-v0/.tmpFfMm5Q/lib/python3.11/site-packages/setuptools/build_meta.py", line 319, in run_setup
exec(code, locals())
File "<string>", line 55, in <module>
File "<string>", line 52, in _guard_py_ver
RuntimeError: Cannot install on Python version 3.11.10; only versions >=3.6,<3.10 are supported.
Expected behavior
Should install and run the python import without errors.
Desktop (optional):
- OS:
ubuntu-latest
,macos-latest
,windows-latest