Skip to content
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

ERROR: Failed building wheel for brotli - Dash subprocess #2283

Closed
Guillaume0789 opened this issue Oct 25, 2022 · 5 comments
Closed

ERROR: Failed building wheel for brotli - Dash subprocess #2283

Guillaume0789 opened this issue Oct 25, 2022 · 5 comments

Comments

@Guillaume0789
Copy link

Guillaume0789 commented Oct 25, 2022

Hello everyone!
I have a problem during the docker build with the dash. From what I read, the sub-dependency with brotli seems to be broken.

Sry if the solution is obvious, i'm new in the develop family.
Thank's a lot !

Describe your context
Here the requirements.txt :
gunicorn
python-dotenv
dash
dash-bootstrap-components
pandas
rasterstats
fiona

Describe the bug
When i build the docker env, an error is raise. The install of the brotli dependence stop. Few days ago (october 21) it worked but not today.
I tried to force an dash v2.6.1 install but it doesn't change anythings.

Screenshots
#0 17.68 Building wheels for collected packages: simplejson, brotli, MarkupSafe
#0 17.68 Building wheel for simplejson (setup.py): started
#0 18.81 Building wheel for simplejson (setup.py): finished with status 'done'
#0 18.81 Created wheel for simplejson: filename=simplejson-3.17.6-py3-none-any.whl size=56341 sha256=0a11d31c5d10008f561bea2457e49a9faaf03564df78e7a967c1018c0440378b
#0 18.81 Stored in directory: /root/.cache/pip/wheels/ac/ad/01/fdffaef366659ffa2f3949e2592e1883efde53e59a49c91114
#0 18.81 Building wheel for brotli (setup.py): started
#0 19.75 Building wheel for brotli (setup.py): finished with status 'error'
#0 19.76 error: subprocess-exited-with-error
#0 19.76
#0 19.76 × python setup.py bdist_wheel did not run successfully.
#0 19.76 │ exit code: 1
#0 19.76 ╰─> [19 lines of output]
#0 19.76 /usr/local/lib/python3.11/site-packages/setuptools/dist.py:771: UserWarning: Usage of dash-separated 'build-base' will not be supported in future versions. Please use the underscore name 'build_base' instead
#0 19.76 warnings.warn(
#0 19.76 running bdist_wheel
#0 19.76 running build
#0 19.76 running build_py
#0 19.76 creating bin
#0 19.76 creating bin/lib.linux-x86_64-cpython-311
#0 19.76 copying python/brotli.py -> bin/lib.linux-x86_64-cpython-311
#0 19.76 warning: build_py: byte-compiling is disabled, skipping.
#0 19.76
#0 19.76 running build_ext
#0 19.76 building '_brotli' extension
#0 19.76 creating bin/temp.linux-x86_64-cpython-311
#0 19.76 creating bin/temp.linux-x86_64-cpython-311/c
#0 19.76 creating bin/temp.linux-x86_64-cpython-311/c/common
#0 19.76 creating bin/temp.linux-x86_64-cpython-311/c/dec
#0 19.76 creating bin/temp.linux-x86_64-cpython-311/c/enc
#0 19.76 gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Ic/include -I/usr/local/include/python3.11 -c c/common/constants.c -o bin/temp.linux-x86_64-cpython-311/c/common/constants.o
#0 19.76 error: command 'gcc' failed: No such file or directory
#0 19.76 [end of output]
#0 19.76
#0 19.76 note: This error originates from a subprocess, and is likely not a problem with pip.
#0 19.76 ERROR: Failed building wheel for brotli
#0 19.76 Running setup.py clean for brotli
#0 20.66 Building wheel for MarkupSafe (setup.py): started
#0 21.84 Building wheel for MarkupSafe (setup.py): finished with status 'done'
#0 21.84 Created wheel for MarkupSafe: filename=MarkupSafe-2.1.1-py3-none-any.whl size=9650 sha256=725a8ee87e43a67a75630246d124a5c1845e5b1fa633005f1b96a3f679d597d7
#0 21.84 Stored in directory: /root/.cache/pip/wheels/96/ee/62/407c247ad088bcb67b530ba3ac1479058c58a651bd6bf09a1f
#0 21.84 Successfully built simplejson MarkupSafe
#0 21.84 Failed to build brotli
#0 22.24 Installing collected packages: pytz, dash-table, dash-html-components, dash-core-components, brotli, affine, tenacity, six, simplejson, shapely, python-dotenv, pyparsing, numpy, MarkupSafe, itsdangerous, gunicorn, click, certifi, attrs, Werkzeug, snuggs, python-dateutil, plotly, munch, Jinja2, cligj, click-plugins, rasterio, pandas, Flask, fiona, rasterstats, flask-compress, dash
#0 22.39 Running setup.py install for brotli: started
#0 23.31 Running setup.py install for brotli: finished with status 'error'
#0 23.32 error: subprocess-exited-with-error
#0 23.32
#0 23.32 × Running setup.py install for brotli did not run successfully.
#0 23.32 │ exit code: 1
#0 23.32 ╰─> [21 lines of output]
#0 23.32 /usr/local/lib/python3.11/site-packages/setuptools/dist.py:771: UserWarning: Usage of dash-separated 'build-base' will not be supported in future versions. Please use the underscore name 'build_base' instead
#0 23.32 warnings.warn(
#0 23.32 running install
#0 23.32 /usr/local/lib/python3.11/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
#0 23.32 warnings.warn(
#0 23.32 running build
#0 23.32 running build_py
#0 23.32 creating bin
#0 23.32 creating bin/lib.linux-x86_64-cpython-311
#0 23.32 copying python/brotli.py -> bin/lib.linux-x86_64-cpython-311
#0 23.32 warning: build_py: byte-compiling is disabled, skipping.
#0 23.32
#0 23.32 running build_ext
#0 23.32 building '_brotli' extension
#0 23.32 creating bin/temp.linux-x86_64-cpython-311
#0 23.32 creating bin/temp.linux-x86_64-cpython-311/c
#0 23.32 creating bin/temp.linux-x86_64-cpython-311/c/common
#0 23.32 creating bin/temp.linux-x86_64-cpython-311/c/dec
#0 23.32 creating bin/temp.linux-x86_64-cpython-311/c/enc
#0 23.32 gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Ic/include -I/usr/local/include/python3.11 -c c/common/constants.c -o bin/temp.linux-x86_64-cpython-311/c/common/constants.o
#0 23.32 error: command 'gcc' failed: No such file or directory
#0 23.32 [end of output]
#0 23.32
#0 23.32 note: This error originates from a subprocess, and is likely not a problem with pip.
#0 23.32 error: legacy-install-failure
#0 23.32
#0 23.32 × Encountered error while trying to install package.
#0 23.32 ╰─> brotli
#0 23.32
#0 23.32 note: This is an issue with the package mentioned above, not pip.
#0 23.32 hint: See above for output from the failure.

@nickmelnikov82
Copy link
Member

Hello @Guillaume0789.

Can you please provide your docker file?

@Guillaume0789
Copy link
Author

Guillaume0789 commented Oct 26, 2022

Hello @nickmelnikov82 ,

Of course, here it is :
`FROM python:3-slim

RUN apt-get update && apt-get install -y inotify-tools

WORKDIR /app

ENV PYTHONDONTWRITEBYTECODE 1

RUN pip install --upgrade pip
COPY ./requirements.txt /app/requirements.txt
RUN pip install -r requirements.txt

COPY ./web /app/ ``

@T4rk1n
Copy link
Contributor

T4rk1n commented Oct 26, 2022

brotli has not published wheels for python 3.11, in the meantime new wheels are published, the dependency needs to be compiled manually, for that you need to install the python-dev packages for python 3.11.

Same for #2286

@Guillaume0789
Copy link
Author

Ok i see.
Thank you for the quick answer @T4rk1n !

@Guillaume0789
Copy link
Author

To close this issue.
I have changed this line in docker file :
'FROM python:3.10-slim'
Now it works !

Thanks guys for the advices !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants