Skip to content
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

Correct way to install python libraries using requirements file #529

Open
Cerebellum-ITM opened this issue Nov 20, 2024 · 2 comments
Open

Comments

@Cerebellum-ITM
Copy link

Cerebellum-ITM commented Nov 20, 2024

Hello everyone, When working with the new version of Odoo 18 I checked that the docker file was modified based on the image with which it is working. This led to my old lines to add python libraries no longer working due to an error that says the following
error: externally-managed-environment

# Copy and install python dependencies
COPY requirements.txt .
RUN pip3 install --no-cache-dir -r requirements.txt# Copy and install python dependencies

Previously they used to use these lines to achieve this. Does anyone know what is the best way to continue using a requirements file and be able to install the python libraries?

I found that using the following line I can skip the restriction but do you think it is correct or what is the best way to manage the libraries?
RUN pip3 install --no-cache-dir --break-system-packages -r requirements.txt

@amh-mw
Copy link

amh-mw commented Nov 22, 2024

It seems that Ubuntu adopted PEP 668 between Jammy and Noble. I think your --break-system-packages workaround is reasonable.

@LuvForAirplanes
Copy link

This must be addressed. This feels like a hack to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants