duckdb: Pip Install fails in Docker python:3.9.7

What happens?

Pip install fails in Docker container. On pip install I get

ERROR: Failed building wheel for duckdb
Running setup.py clean for duckdb
Failed to build duckdb

The fall back setup.py install fails because of a numpy dep. I don’t know enough about pip but I imagine there is an issue with building the python module from source?

To Reproduce

Dockerfile:

FROM python:3.9.7

# Install VIM and Bash completion
RUN apt-get update && apt-get install -y \
    build-essential \
    vim \
    bash-completion \
    git \ 
    curl \
    --no-install-recommends \
    ca-certificates \
    && \
    apt-get clean

# Install Python Requirements
RUN pip3 install -U pip
RUN pip3 install -U wheel
RUN pip3 install -U setuptools

RUN pip install -r requirements.txt

requirements.txt:

# Maths
numpy~=1.21.3
pandas~=1.3.4

# Serving
Flask~=2.1.2

# DB
duckdb~=0.3.4

# APIs
boto3~=1.19.6
requests~=2.22.0

# Lint
black~=22.3.0

Docker commands

docker image build -t duckdb-image:1.0 -f Dockerfile .
docker run duckdb-image:1.0

I’ve tried replacing the requirements install with just pip3 install duckdb --upgrade --pre which works until I try to install my dependancies list after

RUN pip3 install duckdb --upgrade --pre
RUN pip3 install -r requirements.txt # without duckdb
#12 0.666   × python setup.py egg_info did not run successfully.
#12 0.666   │ exit code: 1
#12 0.666   ╰─> [6 lines of output]
#12 0.666       Traceback (most recent call last):
#12 0.666         File "<string>", line 2, in <module>
#12 0.666         File "<pip-setuptools-caller>", line 34, in <module>
#12 0.666         File "/tmp/pip-install-h6vp8k2o/maths_93c88328b7e9410290fd880eec8b934f/setup.py", line 5, in <module>
#12 0.666           version=open('VERSION').read().strip(),
#12 0.666       FileNotFoundError: [Errno 2] No such file or directory: 'VERSION'
#12 0.666       [end of output]

Environment (please complete the following information):

  • OS: Mac 12.4 running Docker python:3.9.7
  • DuckDB Version: 0.3.4
  • DuckDB Client: Python

Before Submitting

  • [X ] Have you tried this on the latest master branch?
  • Python: pip install duckdb --upgrade --pre
  • R: install.packages("https://github.com/duckdb/duckdb/releases/download/master-builds/duckdb_r_src.tar.gz", repos = NULL)
  • Other Platforms: You can find binaries here or compile from source.
  • [X ] Have you tried the steps to reproduce? Do they include all relevant data and configuration? Does the issue you report still appear there?

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 1
  • Comments: 15 (7 by maintainers)

Most upvoted comments

I had the same error with 0.5.1, but I also tried 0.5.0, and 0.4.0. All with the same error above when running docker build. RUN pip3 install duckdb --upgrade --pre` didn’t work either.

I tried different docker base images and different python versions. All with the same error.