Skip to content

BUG: Failure to build 1.3.1 on Docker image #42745

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

Closed
2 of 3 tasks
zemzale opened this issue Jul 27, 2021 · 5 comments · Fixed by #43241
Closed
2 of 3 tasks

BUG: Failure to build 1.3.1 on Docker image #42745

zemzale opened this issue Jul 27, 2021 · 5 comments · Fixed by #43241
Assignees
Labels
Build Library building on various platforms Docs
Milestone

Comments

@zemzale
Copy link

zemzale commented Jul 27, 2021

  • I have checked that this issue has not already been reported.

  • I have confirmed this bug exists on the latest version of pandas.

  • (optional) I have confirmed this bug exists on the master branch of pandas.


Code Sample, a copy-pastable example

Docker image file

FROM golang:1.16

RUN apt-get update \ 
    && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
    python3 \
    python3-pip 

COPY requirements.txt /requirements.txt

RUN python3 -m pip install -r /requirements.txt

Requirments file

pandas == 1.3.1

Command to run

docker build --file Dockerfile --tag test-image:latest .  

Problem description

We have been using a similar docker image(retracted the unrelated parts) with pandas version 1.3.0 so far with no problems.

When the version changed to 1.3.1 we are getting compile errors, and since the only variable that changed is pandas version, I have to assume it's problem with that.

Dropping the version back to 1.3.0 fixes the problem and everything works correctly.

Expected Output

Expected no output except the fact that install was a success

Actually got

---RETRACTED A LOT OF COPYING OPERATIONS---
#8 187.7     copying pandas/_libs/tslibs/src/datetime/np_datetime_strings.h -> build/lib.linux-x86_64-3.7/pandas/_libs/tslibs/src/datetime
#8 187.7     UPDATING build/lib.linux-x86_64-3.7/pandas/_version.py
#8 187.7     set build/lib.linux-x86_64-3.7/pandas/_version.py to '1.3.1'
#8 187.7     running build_ext
#8 187.7     building 'pandas._libs.algos' extension
#8 187.7     creating build/temp.linux-x86_64-3.7
#8 187.7     creating build/temp.linux-x86_64-3.7/pandas
#8 187.7     creating build/temp.linux-x86_64-3.7/pandas/_libs#8 187.7     x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -W
#8 187.7     x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DNPY_NO_DEPRECATED_API=0 -I./pandas/_libs -Ipandas/_libs/src/klib -I/tmp/pip-build-env-ailjqcbp/lib/python3.7/site-packages/numpy/core/include -I/usr/include/python3.7m -c pandas/_libs/algos.c -o build/temp.linux-x86_64-3.7/pandas/_libs/algos.o
#8 187.7     pandas/_libs/algos.c:42:10: fatal error: Python.h: No such file or directory
#8 187.7      #include "Python.h"
#8 187.7               ^~~~~~~~~~
#8 187.7     compilation terminated.
#8 187.7     error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
#8 187.7     
#8 187.7     ----------------------------------------
#8 187.9 Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-quz7o69n/pandas/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-ygkh2jru/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-quz7o69n/pandas/
------
executor failed running [/bin/sh -c python3 -m pip install -r /requirements.txt]: exit code: 1
@zemzale zemzale added Bug Needs Triage Issue that has not been reviewed by a pandas team member labels Jul 27, 2021
@simonjayhawkins simonjayhawkins added the Build Library building on various platforms label Jul 27, 2021
@simonjayhawkins simonjayhawkins added this to the 1.3.2 milestone Jul 27, 2021
@lithomas1
Copy link
Member

What is your python version and hardware(it looks like you are on x86_64)?

@zemzale
Copy link
Author

zemzale commented Jul 27, 2021

This all is run on docker on x86_64 machines. They all based on debian buster images and the version of python is 3.7.3

@lithomas1
Copy link
Member

lithomas1 commented Jul 28, 2021

I forgot to ask, but what's your pip version? We recently upgraded our wheels to manylinux2014 and it looks like you're not able to install our wheels for some reason(maybe because your pip version is out of date, right now, pip is falling back to compiling from source I think).

@zemzale
Copy link
Author

zemzale commented Jul 28, 2021

pip version

# pip3 --version
pip 18.1 from /usr/lib/python3/dist-packages/pip (python 3.7)

I updated pip to the newest version(21.2.1), and then tried to install pandas and everything worked just fine, so indeed outdated pip version was at fault.

Thanks for the help anyways. I don't work with python a lot so I never would have thought that pip might be at fault here.

@zemzale zemzale closed this as completed Jul 28, 2021
@lithomas1 lithomas1 removed this from the 1.3.2 milestone Jul 28, 2021
@lithomas1 lithomas1 added Docs and removed Bug Needs Triage Issue that has not been reviewed by a pandas team member labels Jul 28, 2021
@lithomas1 lithomas1 reopened this Jul 28, 2021
@lithomas1
Copy link
Member

No problem. I think we might be able to update our docs to specify the minimum version of pip needed to install pandas(19.3 is required I think).
cc @simonjayhawkins

@lithomas1 lithomas1 self-assigned this Aug 27, 2021
@jreback jreback added this to the 1.4 milestone Aug 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Build Library building on various platforms Docs
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants