-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
[1.7] [Errno 2] No such file or directory: '/usr/pyvenv.cfg'
when running poetry add
in nvidia/cuda:...ubuntu22.04
image
#8646
Comments
[Errno 2] No such file or directory: '/usr/pyvenv.cfg'
when running poetry add
in nvidia/cuda:...ubuntu22.04
image[Errno 2] No such file or directory: '/usr/pyvenv.cfg'
when running poetry add
in nvidia/cuda:...ubuntu22.04
image
I have a similar issue using a Python interpreter in a conda environment for poetry. When I first run
Everything works as expected, but for subsequent calls to the same command, I have to delete and re-create my conda environment. I am not 100% sure that this is deterministic or what causes the issue.
This is the error that I see:
|
I have a somewhat similar issue. poetry works fine on terminal, however, as soon as it is called from a dockerfile, it fails directly in the install step! This only started happening with poetry 1.7.0 dickerfile ARG PYTHON_VERSION=3.11
FROM python:$PYTHON_VERSION-slim AS ci
# Keeps Python from generating .pyc files in the container
ENV PYTHONDONTWRITEBYTECODE=1
# Turns off buffering for easier container logging
ENV PYTHONUNBUFFERED=1
# Install needed utlities and compilers that may be required for certain packages or platforms.
RUN : \
&& apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
git \
curl \
bash \
vim \
build-essential \
&& rm -rf /var/lib/apt/lists/*
# Update pip to the latest available version
RUN pip3 install --upgrade pip
# Set the working directory in the container
WORKDIR /ciUser
# Set python path
ENV PYTHONPATH=/ciUser
# Install & configure needed package
RUN : \
&& pip3 install poetry \
&& poetry config virtualenvs.create false
# Install requirements
COPY pyproject.toml .
COPY poetry.lock .
RUN poetry install
# Init git repo
RUN git init -b ci
# Port commit checks config
COPY .pre-commit-config.yaml .
# Port flake8 config
COPY .flake8 .
# Install & pre-load pre-commit enviroments
RUN : \
&& pre-commit install --install-hooks \
&& pre-commit run
# Copy the content of the `src` directory to the working directory
COPY src/ ./src
# Copy template information
COPY .cruft.json .
# Copy `README.md` to the working directory
COPY README.md ./README.md
# Add all files to trigger commit checks
RUN git add .
# Enable container to be used as a binary that accepts input
ENTRYPOINT ["/bin/bash", "-c"] error: > • Installing pdoc (12.3.1)
>
> FileNotFoundError
>
> [Errno 2] No such file or directory: '/usr/local/lib/python3.11/site-packages/virtualenv/activation/nushell/activate.nu'
>
> at /usr/local/lib/python3.11/pathlib.py:1044 in open
> 1040│ the built-in open() function does.
> 1041│ """
> 1042│ if "b" not in mode:
> 1043│ encoding = io.text_encoding(encoding)
> → 1044│ return io.open(self, mode, buffering, encoding, errors, newline)
> 1045│
> 1046│ def read_bytes(self):
> 1047│ """
> 1048│ Open the file in bytes mode, read it, and close the file. |
I can confirm that my issue above is now resolved, using the latest commit on master b9aab34 |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
nvidia/cuda:11.8.0-cudnn8-runtime-ubuntu22.04
-vvv
option) and have included the output below.Issue
I'm running into a
[Errno 2] No such file or directory: '/usr/pyvenv.cfg'
error when trying to runpoetry add
orpoetry install
within a docker container based onnvidia/cuda:11.8.0-cudnn8-runtime-ubuntu22.04
.Debugging Details:
1.6.1
- only1.7.0
FROM python:3.10
)poetry config virtual-envs.create false
I included a
Dockerfile
in my attached gist, with the build args POETRY_VERSION and POETRY_VIRTUALENVS_CREATE to help isolate the issue. The error can be demonstrated with the following command:docker build . --build-arg POETRY_VERSION=1.7.0 --build-arg POETRY_VIRTUALENVS_CREATE=false
The docker build fails on the last step (
RUN poetry add six -vvv
), and produces the following output. PS: the package used to test (six
) is arbitrary - it fails for any package I've triedThe text was updated successfully, but these errors were encountered: