odoo / odoo/docker

Correct way to install python libraries using requirements file

Open
#529 8 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Dockerfile
Stars
1.2k
Forks
1.7k
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Dockerfile and requirements.txt installation commands shown in the issue, then reproduce the externally-managed-environment error with the Odoo 18 image. Compare supported dependency-installation approaches and confirm the selected approach builds successfully without the reported error.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, python
Domain
devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.