Correct way to install python libraries using requirements file
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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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