Hi, I'm getting Errors installing uwsgi using pip on rc-buster, rc-alpine, rc-slim as well as with alipine and slim.
The installation on python:buster runs fine.
The trace is very large so here is the final message:
ERROR: Command errored out with exit status 1: /usr/local/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-iz491tr6/uwsgi_c1a46202d7044650b950af7a629818f0/setup.py'"'"'; __file__='"'"'/tmp/pip-install-iz491tr6/uwsgi_c1a46202d7044650b950af7a629818f0/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-6suqe6iy/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.10/uWSGI Check the logs for full command output.
This is part of the log: Building wheel for uWSGI (setup.py): finished with status 'error'
I'm not sure if this triggered the error but apparently this function is deprecated
plugins/python/python_plugin.c:319:33: warning: βPyEval_CallObjectWithKeywordsβ is deprecated [-Wdeprecated-declarations]
PyEval_CallObject(random_seed, random_args);
oh BTW I tried installing the packages: python3.7-dev build-essential and linux-headers-amd64 but the error didn't change obviously because I was using pip.
I understand that this looks like an issue with pip but it works on python:buster so I think this is probably associated with this project somehow. Anyway I will appreciate your help
And pip install mod-wsgi-standalone also throws an error in standalone images.
Downloading mod_wsgi-standalone-4.7.0.tar.gz (496 kB)
|ββββββββββββββββββββββββββββββββ| 496 kB 6.5 MB/s
Installing build dependencies ... -
But with rc-alpine I get the following error
configure: error: in `/tmp/pip-install-xs7ny4uu/mod-wsgi-httpd_a46ec7620b604c2597aaadd8611dd7bd/build/apr-1.7.0':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details
Am I missing something?
Am I sopposed to add dev packages in the latest images available at hub.docker?
So you only experience the issues on the rc versions with uwsgi?
python:rc-buster,
python:rc-alpine,
python:rc-slim,
python:alipine,
python:slim
with both uwsgi and mod-wsgi-standalone (I didn't try pip install mod-wsgi because I didn't have httpd installed)
Note that pip install uwsgi works fine on python:buster.
The rc versions are all currently the (unreleased) 3.10 series, which probably isn't supported by uwsgi yet - the slim and alpine images are optimized for size, so in order to install modules that need a compiler, you'll need to install one (the buster non-slim images already contain the necessary compiler).
Thank you.
I opened this issue because I thought those are release candidates.
I understand these images are lightweight versions but it's not clear which packages should I use i.e. python3.x-dev or build essentials and build uwsgi form source which loose the entire purpose of containers.
Should I close the issue?
Do you think I should open an issue in pypi? Because they would tell me that it's not their fault that an image doesn't have the appropriate packages in order to use pip
No, this is a usability/understand gap, not an issue with the image or pip or pypi, frankly. :sweat_smile:
What I'd suggest is asking for help understanding how to accomplish what you're looking for from a dedicated support forum such as the Docker Community Forums, the Docker Community Slack, or Stack Overflow. :+1:
Thank you, I don't need it, I'm using python:buster.
But this issue is something to have in mind if someone tries to use the python:rc-buster because as you agreed it's a release candidate, not the last release.
Thanks for your reply
You really ought to be more specific in the version of Python you're using -- as I've noted above, uwsgi does not appear to support Python 3.10 yet, and might not until after it's released and python:buster starts pointing at it, so I'd really recommend you instead switch to python:3.9-buster instead so that you're controlling your dependencies/versions more directly.
That's a good point, thanks for your time and I appreciate your recommendation