Git Product home page Git Product logo

Comments (3)

LaurentGoderre avatar LaurentGoderre commented on June 3, 2024 2

This is a known behavior of pip. This post has many different ways to solve this problem: https://stackoverflow.com/questions/75608323/how-do-i-solve-error-externally-managed-environment-every-time-i-use-pip-3

from docker-node.

LaurentGoderre avatar LaurentGoderre commented on June 3, 2024 2

Is it ok to close this issue then since there are ways to solve this?

from docker-node.

Akshaypatil15 avatar Akshaypatil15 commented on June 3, 2024

I encountered a similar problem as reported in [GitHub Issue #2010]

   #7 [ 3/10] RUN pip install openpyxl --user
   #7 1.604 error: externally-managed-environment
   .
   .
   .
   ------
   Dockerfile:5
   --------------------
      3 |     # Install python framework along with its dependency packages 
      4 |     RUN apk add g++ make python3 py3-pip
      5 | >>> RUN pip install openpyxl --user
      6 |     
      7 |     # Create app directory
   --------------------
   ERROR: failed to solve: process "/bin/sh -c pip install openpyxl --user" did not complete successfully: exit code: 1
   Error: Process completed with exit code 1.

Solution

To resolve this issue, I made the following changes in the Dockerfile:

# Install python framework along with its dependency packages 
RUN apk add g++ make python3 py3-pip

# Create a virtual environment and install required packages
RUN python3 -m venv ~/pyvenv --system-site-packages
RUN ~/pyvenv/bin/pip3 install openpyxl

from docker-node.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.