From c5c23d8d8cc1577e38498e761a9d5f8413b7fb56 Mon Sep 17 00:00:00 2001 From: Evgeny Proydakov Date: Mon, 24 Jul 2023 13:27:28 +0300 Subject: [PATCH] Fixed lit install on ARCH Linux - venv instead of system install MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Step 5/10 : RUN pip3 install lit ---> Running in 2e06fb37c145 error: externally-managed-environment × This environment is externally managed ╰─> To install Python packages system-wide, try 'pacman -S python-xyz', where xyz is the package you are trying to install. If you wish to install a non-Arch-packaged Python package, create a virtual environment using 'python -m venv path/to/venv'. Then use path/to/venv/bin/python and path/to/venv/bin/pip. If you wish to install a non-Arch packaged Python application, it may be easiest to use 'pipx install xyz', which will manage a virtual environment for you. Make sure you have python-pipx installed via pacman. note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages. hint: See PEP 668 for the detailed specification. --- Dockerfile_archlinux | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Dockerfile_archlinux b/Dockerfile_archlinux index 8cf12cff..eaf41370 100644 --- a/Dockerfile_archlinux +++ b/Dockerfile_archlinux @@ -14,6 +14,7 @@ FROM archlinux ENV LLVM_DIR /usr/ ENV TUTOR_DIR /llvm-tutor +ENV VENV_DIR /venv # 1. INSTALL DEPENDENCIES RUN pacman -Syu --noconfirm \ @@ -26,7 +27,8 @@ RUN pacman -Syu --noconfirm \ python-pip # 2. INSTALL LIT -RUN pip3 install lit +RUN python3 -m venv $VENV_DIR +RUN $VENV_DIR/bin/pip3 install lit # 3. CLONE LLVM-TUTOR RUN git clone https://github.com/banach-space/llvm-tutor $TUTOR_DIR @@ -44,4 +46,4 @@ RUN mkdir -p $TUTOR_DIR/build \ && cd $TUTOR_DIR/build \ && cmake -G Ninja -DLT_LLVM_INSTALL_DIR=$LLVM_DIR ../ \ && ninja \ - && lit test/ + && $VENV_DIR/bin/lit test/