sul-dlss / was-pywb

Configuration for Stanford's pywb instance
https://swap.stanford.edu
Other
2 stars 0 forks source link

error: externally-managed-environment #198

Closed edsu closed 1 year ago

edsu commented 1 year ago

When building the Docker image we are now seeing this error:

Step 17/19 : RUN pip3 install --requirement requirements.txt
 ---> Running in eca7aad26744
error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
    python3-xyz, where xyz is the package you are trying to
    install.

    If you wish to install a non-Debian-packaged Python package,
    create a virtual environment using python3 -m venv path/to/venv.
    Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
    sure you have python3-full installed.

    If you wish to install a non-Debian packaged Python application,
    it may be easiest to use pipx install xyz, which will manage a
    virtual environment for you. Make sure you have pipx installed.

    See /usr/share/doc/python3.11/README.venv for more information.

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.
The command '/bin/sh -c pip3 install --requirement requirements.txt' returned a non-zero code: 1

Exited with code exit status 1

It looks like this is the result of Debian support for PEP-668 which no longer allows you to pip install into the system python.

I think this will be resolved if we apt install python3-poetry instead of installing poetry with pip.