uv: Can't install wheel in working directory without specifying `./`
- I want to use
uvinside docker to install wheel packages. Unfortunately it doesn’t work and gives following error
No solution found when resolving dependencies:
╰─▶ Because python-dotenv-1-0-1-py3-none-any-whl was not found in the package registry and you require
python-dotenv-1-0-1-py3-none-any-whl, we can conclude that the requirements are unsatisfiable.
-
I have used python-dotenv wheel as an example. It doesn’t work on any wheel files.
-
BTW, this behaviour is only inside Docker, outside the Docker, everything works as expected.
-
Example Dockerfile
ARG PYTHON_VERSION=3.11
FROM python:${PYTHON_VERSION}-slim-bookworm as production
ENV \
PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
PYTHONFAULTHANDLER=1 \
PIP_ROOT_USER_ACTION=ignore \
UV_SYSTEM_PYTHON=1 \
UV_NO_CONFIG=1 \
UV_NO_CACHE=1
WORKDIR /app
RUN \
apt-get update -y \
&& apt-get install -y --no-install-recommends \
curl \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/archives
ADD --chmod=755 https://astral.sh/uv/install.sh /install.sh
RUN /install.sh && rm /install.sh
ENV PATH="/root/.cargo/bin/:$PATH"
RUN curl \
https://files.pythonhosted.org/packages/6a/3e/b68c118422ec867fa7ab88444e1274aa40681c606d59ac27de5a5588f082/python_dotenv-1.0.1-py3-none-any.whl \
--output python_dotenv-1.0.1-py3-none-any.whl
# NOTE: Gives error
RUN uv pip install python_dotenv-1.0.1-py3-none-any.whl
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 15 (7 by maintainers)
@lexiconlp I think you’re looking for
uv add python-dotenv.I’ll leave this open until we know what we want to do for improvements.