I am trying to make a build from a dockerfile and in that process it needs to install numpy python package. It keeps running to some wierd error and m not able to get through numpy installation. Below is the details of my python package.
FROM ubuntu:22.04
# ENV PATH="/scripts:${PATH}"
COPY ./requirements.txt /requirements.txt
WORKDIR /
RUN apt-get update &&
apt-get install -y software-properties-common && add-apt-repository ppa:deadsnakes/ppa
RUN apt-get update
RUN apt-get install -y wget tar python3.7 python3.7-dev libc-dev gcc make python3-pip build-essential libcurl4-openssl-dev libpq-dev libssl-dev libffi-dev libjpeg-dev libfreetype6-dev zlib1g-dev redis-server
RUN wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
RUN apt install -y ./google-chrome-stable_current_amd64.deb
RUN wget http://prdownloads.sourceforge.net/ta-lib/ta-lib-0.4.0-src.tar.gz && tar -xzvf ta-lib-0.4.0-src.tar.gz
WORKDIR /ta-lib
RUN ./configure --prefix=/usr && make && make install
RUN pip install --upgrade pip
RUN pip install setuptools==65.5.0
RUN pip install cython==0.29.37
RUN pip install importlib-metadata==4.13.0
RUN pip install numpy==1.18.1
After running the above dockerfile i run into the issue below:
(Just posting the last part of the error)
119.5 error: Command "x86_64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -DNPY_INTERNAL_BUILD=1 -DHAVE_NPY_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -Ibuild/src.linux-x86_64-3.10/numpy/core/src/umath -Ibuild/src.linux-x86_64-3.10/numpy/core/src/npymath -Ibuild/src.linux-x86_64-3.10/numpy/core/src/common -Inumpy/core/include -Ibuild/src.linux-x86_64-3.10/numpy/core/include/numpy -Inumpy/core/src/common -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -I/usr/include/python3.10 -Ibuild/src.linux-x86_64-3.10/numpy/core/src/common -Ibuild/src.linux-x86_64-3.10/numpy/core/src/npymath -c build/src.linux-x86_64-3.10/numpy/core/src/multiarray/scalartypes.c -o build/temp.linux-x86_64-cpython-310/build/src.linux-x86_64-3.10/numpy/core/src/multiarray/scalartypes.o -MMD -MF build/temp.linux-x86_64-cpython-310/build/src.linux-x86_64-3.10/numpy/core/src/multiarray/scalartypes.o.d -std=c99" failed with exit status 1
119.5 [end of output]
119.5
119.5 note: This error originates from a subprocess, and is likely not a problem with pip.
119.5 ERROR: Failed building wheel for numpy
119.5 Failed to build numpy
119.5 ERROR: Could not build wheels for numpy, which is required to install pyproject.toml-based projects
I have tried various options from the post of stackoverflow but none has worked so far.
New contributor
Mohit Sharma is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.