I'm having some weird behavior when trying to install multiple packages with uv
as follows
uv pip install --system spatialpandas \
easydev \
colormap \
colorcet \
duckdb \
dask_geopandas \
hydrotools \
sidecar \
dataretrieval \
google-cloud-bigquery
This results in the following error
Using Python 3.11.8 environment at: /srv/conda/envs/notebook
Resolved 140 packages in 384ms
× Failed to build `numba==0.53.1`
├─▶ The build backend returned an error
╰─▶ Call to `setuptools.build_meta:__legacy__.build_wheel` failed (exit status: 1)
[stderr]
Traceback (most recent call last):
File "<string>", line 14, in <module>
File "/home/jovyan/.cache/uv/builds-v0/.tmpBarfZb/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/jovyan/.cache/uv/builds-v0/.tmpBarfZb/lib/python3.11/site-packages/setuptools/build_meta.py", line 304, in _get_build_requires
self.run_setup()
File "/home/jovyan/.cache/uv/builds-v0/.tmpBarfZb/lib/python3.11/site-packages/setuptools/build_meta.py", line 522, in run_setup
super().run_setup(setup_script=setup_script)
File "/home/jovyan/.cache/uv/builds-v0/.tmpBarfZb/lib/python3.11/site-packages/setuptools/build_meta.py", line 320, in run_setup
exec(code, locals())
File "<string>", line 50, in <module>
File "<string>", line 47, in _guard_py_ver
RuntimeError: Cannot install on Python version 3.11.8; only versions >=3.6,<3.10 are supported.
hint: This usually indicates a problem with the package or the build environment.
help: `numba` (v0.53.1) was included because `spatialpandas` (v0.5.0) depends on `numba`
However, installing all the packages individually in the same order uv pip install --system <package>
works without any issue. If above is a dependency error it should happen for individual installation as well?
I'm having some weird behavior when trying to install multiple packages with uv
as follows
uv pip install --system spatialpandas \
easydev \
colormap \
colorcet \
duckdb \
dask_geopandas \
hydrotools \
sidecar \
dataretrieval \
google-cloud-bigquery
This results in the following error
Using Python 3.11.8 environment at: /srv/conda/envs/notebook
Resolved 140 packages in 384ms
× Failed to build `numba==0.53.1`
├─▶ The build backend returned an error
╰─▶ Call to `setuptools.build_meta:__legacy__.build_wheel` failed (exit status: 1)
[stderr]
Traceback (most recent call last):
File "<string>", line 14, in <module>
File "/home/jovyan/.cache/uv/builds-v0/.tmpBarfZb/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/jovyan/.cache/uv/builds-v0/.tmpBarfZb/lib/python3.11/site-packages/setuptools/build_meta.py", line 304, in _get_build_requires
self.run_setup()
File "/home/jovyan/.cache/uv/builds-v0/.tmpBarfZb/lib/python3.11/site-packages/setuptools/build_meta.py", line 522, in run_setup
super().run_setup(setup_script=setup_script)
File "/home/jovyan/.cache/uv/builds-v0/.tmpBarfZb/lib/python3.11/site-packages/setuptools/build_meta.py", line 320, in run_setup
exec(code, locals())
File "<string>", line 50, in <module>
File "<string>", line 47, in _guard_py_ver
RuntimeError: Cannot install on Python version 3.11.8; only versions >=3.6,<3.10 are supported.
hint: This usually indicates a problem with the package or the build environment.
help: `numba` (v0.53.1) was included because `spatialpandas` (v0.5.0) depends on `numba`
However, installing all the packages individually in the same order uv pip install --system <package>
works without any issue. If above is a dependency error it should happen for individual installation as well?
1 Answer
Reset to default 1I tried it in my macbook pro M3 ARM64:
mkdir uv-test-install
cd uv-test-install
uv --version
uv 0.6.4 (04db70662 2025-03-03)
uv init # to initiate virtual environment for this folder
uv pip install --system spatialpandas \
easydev \
colormap \
colorcet \
duckdb \
dask_geopandas \
hydrotools \
sidecar \
dataretrieval \
google-cloud-bigquery
which python
/opt/homebrew/Caskroom/miniconda/base/bin/python
It installed everything without problems.
I would think that your Python which uv
uses for your environment - is that of a conda environment, too.
And it would depend on what is installed in that package before - that could possibly interfere with your installation procedure?
You use --system
which tells uv
not to use the local virtual environment, but the environment of your python
which you are using "globally". In this case, this is your conda environment - because that is one level over your local uv
.
You can prove that yourself by starting your python and then:
import spatialpandas
spatialpandas.__file__
This will show the exact location of your patialpandas
package file.
And in my case this leads to the exact conda environment of my Python.
And there you see the problem: You uv
because of the --system
flag has to check the versions in the conda environment - which don't have a pyproject.toml
.
If I would be you, I wouldn't use the --system
flag. Then, uv
would use a local .venv
environment or one in ~/.local/uv// where it would create for your current folder a folder for the virtual environment.
if you however would do uv venv
in the folder where you are, it would create a .venv
folder and installs all the uv
installs without the --system
flag - into this local folder.
However
Because of the --system
flag - because uv
is using
Using Python 3.11.8 environment at: /srv/conda/envs/notebook it shoudl actulally install into a folder there.
But in your error message, I see:
/home/jovyan/.cache/uv/builds-v0/.tmpBarfZb/lib/python3.11/site-packages/setuptools/build_meta.py"
And it later says:
RuntimeError: Cannot install on Python version 3.11.8; only versions >=3.6,<3.10 are supported.
So it seems your uv
wherever you are is actually somehow locked to versions >=3.6,<3.10
? I think the discrepancy comes from the --system
flag.
the --system
flag makes sense when you are installing in a Docker container using uv
. Since you have anyway only one environment there, it is not causing any harm.
But in an environment with multiple virtual environments, I would avoid --system
- especially, if this would make it use a preexisting environment into which you already installed packages - not using uv
.
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1743912521a4528621.html
uv/pip
confirm? – F Baig Commented Apr 1 at 18:54--system
— I installed everything into a fresh new virtual env to avoid churning my system) works for me. Python 3.11 on Debian Linux, Debian 12 stable "bookworm". Version ofnumba
installed is 0.61.0.uv
version 0.6.11. – phd Commented Apr 2 at 12:31