0

Hi Im using docker and drf, and here is my actions and problems.

first, I run this instruction:

pip install -r requirements.txt --use-deprecated=legacy-resolver

and my requirements file is this.:

asgiref==3.5.2
backports.zoneinfo==0.2.1
Django==4.1.2
django-dotenv==1.4.2
djangorestframework==3.14.0
mysql-connector-python==8.0.26
mysqlclient==2.1.1
protobuf==4.21.9
pytz==2022.5
sqlparse==0.4.3
uWSGI==2.0.21

then this error arise:

error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [8 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "C:\Users\jia52\AppData\Local\Temp\pip-install-2eb55qko\uwsgi\setup.py", li
ne 3, in <module>
          import uwsgiconfig as uc
        File "C:\Users\jia52\AppData\Local\Temp\pip-install-2eb55qko\uwsgi\uwsgiconfig.p
y", line 8, in <module>
          uwsgi_os = os.uname()[0]
      AttributeError: module 'os' has no attribute 'uname'
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.  
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> uWSGI

what should I do to solve this problem? I don't know where can I found answer.

Jia Kwon
  • 11
  • 5
  • Does this answer your question? [pip install uwsgi gives Error : AttributeError: module 'os' has no attribute 'uname'](https://stackoverflow.com/questions/68616000/pip-install-uwsgi-gives-error-attributeerror-module-os-has-no-attribute-un) – Abdul Aziz Barkat Oct 31 '22 at 11:57

1 Answers1

0

If you check the documentation of uname you will see;

Availability: recent flavors of Unix.

You may want to check this answer.

Python program running inside docker container relies upon 'uname -r'

Ömer Alkin
  • 163
  • 3
  • 17