-
Notifications
You must be signed in to change notification settings - Fork 765
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
uv sync
fails when interpreter is not named python[3]
#4709
Comments
See |
uv sync
fails when interpreter is not named python[3]
The current behaviour is a problem when using pyenv: When using For example with both This fails:
This passes:
uv should find the python 3.10 interpreter in either case. ReproductionFROM ubuntu
ENV DEBIAN_FRONTEND=noninteractive
RUN apt update
RUN apt install -yy build-essential libssl-dev zlib1g-dev \
libbz2-dev libreadline-dev libsqlite3-dev curl git \
libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev
RUN curl https://pyenv.run | bash
ENV PATH="/root/.pyenv/bin:$PATH"
RUN CONFIGURE_OPTS="--enable-optimizations" pyenv install 3.8.12 3.8.18
RUN CONFIGURE_OPTS="--enable-optimizations" pyenv install 3.9.18
RUN CONFIGURE_OPTS="--enable-optimizations" pyenv install 3.10.13
RUN CONFIGURE_OPTS="--enable-optimizations" pyenv install 3.11.7
RUN CONFIGURE_OPTS="--enable-optimizations" pyenv install 3.12.1
RUN pyenv global 3.8.12 3.8.18 3.9.18 3.10.13 3.11.7 3.12.1
# https://github.com/pyenv/pyenv#set-up-your-shell-environment-for-pyenv
RUN echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc \
&& echo 'command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc \
&& echo 'eval "$(pyenv init -)"' >> ~/.bashrc Create a dummy pyproject.toml, any [project]
name = "a"
version = "0.1.0"
requires-python = "==3.10.*"
dependencies = ["tqdm"] Compile uv:
Start the docker container, mount the uv dir to
|
I think this needs an owner. @konstin? |
Will do |
Search for all `python3.x` minor versions, skipping those we already know we can use. For example. let's say `python` and `python3` are Python 3.10. When a user requests `>= 3.11`, we still need to find a `python3.12` in PATH. Fixes #4709
Search for all `python3.x` minor versions, skipping those we already know we can use. For example. let's say `python` and `python3` are Python 3.10. When a user requests `>= 3.11`, we still need to find a `python3.12` in PATH. Fixes #4709
Search for all `python3.x` minor versions in PATH, skipping those we already know we can use. For example, let's say `python` and `python3` are Python 3.10. When a user requests `>= 3.11`, we still need to find a `python3.12` in PATH. We do so with a regex matcher. Fixes #4709
See discussion in #4277
Instead of only searching for, e.g.,
python3.12
executables when Python 3.12 is requested (and not during the default search), we should usewhich_re
(or a manually implementedwhich
) to find all possible Python executables then filter them to meet the version request (if necessary).The text was updated successfully, but these errors were encountered: