-
Notifications
You must be signed in to change notification settings - Fork 750
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 venv --python <version>
fails when querying managed python interpreter on alpine
#6392
Comments
Yeah, you should be able to use |
Is |
Sorry yes that is just |
No I think we don't yet have proper musl detection (\cc @konstin who knows this best). That script does work for me with dynamically-linked glibc (e.g. |
I'm very confused by
|
Oh right looks like you'll need FROM alpine
ARG RYE_VER="0.39.0"
ARG UV_VER="0.3.0"
ARG VENV_DIR="/tmp/foo/venvs"
ARG VENV_NAME="venv-3-11"
ARG PYTHON_VERSION="3.11"
ENV UV_PYTHON_INSTALL_DIR="/tmp/uv"
RUN apk add --no-cache musl-dev
WORKDIR /tmp
ADD "https://github.com/astral-sh/rye/releases/download/${RYE_VER}/rye-x86_64-linux.gz" .
ADD "https://github.com/astral-sh/uv/releases/download/${UV_VER}/uv-x86_64-unknown-linux-musl.tar.gz" .
RUN gzip -vd rye-x86_64-linux.gz && chmod +x rye-x86_64-linux && \
mv rye-x86_64-linux /usr/local/bin/rye && \
tar xfv uv-x86_64-unknown-linux-musl.tar.gz && \
chmod +x uv-x86_64-unknown-linux-musl/* && \
mv uv-x86_64-unknown-linux-musl/* /usr/local/bin/
RUN uv venv --python "${PYTHON_VERSION}" "${VENV_DIR}/${VENV_NAME}"
ENTRYPOINT ["${VENV_DIR}/${VENV_NAME}/bin/python", "--version"] Gives:
|
I've reproduced this — I think it's complaining that GNU Libc is not found (in a very cryptic way) https://stackoverflow.com/questions/77418700/python-not-found-in-alpine-image |
Interestingly if you force a musl download, e.g., with:
We still fail
|
uv venv --python <version>
fails to download pythonuv venv --python <version>
fails when querying managed python interpreter on alpine
|
Since we don't have a properly working Python interpreter for musl, we now show a correct error message that you need to install Python using the system tools (e.g. |
We no longer provide managed interpreters due to this error. We can track this in #6890 now — but this is an upstream python-build-standalone issue. |
Separately there's always αpε to consider… e.g., with superconfigure |
Saw your release notes and thought - perfect:
So gave it a shot:
Error:
PS: Would be nice to keep things out of
/root
, is there a flag to set that directory?The text was updated successfully, but these errors were encountered: