PacktPublishing / Django-4-by-example

Django 4 by example (4th Edition) published by Packt
https://djangobyexample.com/
MIT License
799 stars 461 forks source link

Chapter 17. Error installing uWSGI in docker #44

Open robeche opened 1 year ago

robeche commented 1 year ago

Hi there,

I'm in chapter 17 trying to create the docker image, but when it tries to install the uwsgi image it shows the following error:

#0 17.93 Failed to build uwsgi
#0 17.93 ERROR: Could not build wheels for uwsgi, which is required to install pyproject.toml-based projects

I have tried to install it in the virtual environment as well but i get:

AttributeError: module 'os' has no attribute 'uname'. Did you mean: 'name'?

I did some search which explains that i should run the command via cygwin, but i don't know how it will be possible to run it from docker...

Where is the trick to install it?

Kind regards

Roberto

Vkuzmeniuk commented 1 year ago

The save for me =(

robeche commented 1 year ago

I fixed it by removing uwsgi from the requirements list and installing it before... so basically add the following to the docker file: RUN pip install uwsgi

jmpmcmanus commented 12 months ago

Upgrading uwsgi==2.0.20 to uwsgi==2.0.22 worked for me.