При попытке установить django получаю ERROR: Could not build wheels for backports.zoneinfo, который необходим для установки проектов на основе pyproject.toml

Я пытаюсь установить django, но получаю эту ошибку. Нашел много комментариев как решить эту проблему, но мне ничего не помогло. Может кто-то сталкивался с такой же проблемой. Используется версия Python 3.8.9

Log:

Collecting django
  Using cached Django-4.1-py3-none-any.whl (8.1 MB)
Collecting backports.zoneinfo
  Using cached backports.zoneinfo-0.2.1.tar.gz (74 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting sqlparse>=0.2.2
  Using cached sqlparse-0.4.2-py3-none-any.whl (42 kB)
Collecting asgiref<4,>=3.5.2
  Using cached asgiref-3.5.2-py3-none-any.whl (22 kB)
Building wheels for collected packages: backports.zoneinfo
  Building wheel for backports.zoneinfo (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Building wheel for backports.zoneinfo (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [25 lines of output]
      running bdist_wheel
      running build
      running build_py
      running egg_info
      writing src/backports.zoneinfo.egg-info/PKG-INFO
      writing dependency_links to src/backports.zoneinfo.egg-info/dependency_links.txt
      writing requirements to src/backports.zoneinfo.egg-info/requires.txt
      writing top-level names to src/backports.zoneinfo.egg-info/top_level.txt
      reading manifest file 'src/backports.zoneinfo.egg-info/SOURCES.txt'
      reading manifest template 'MANIFEST.in'
      /private/var/folders/pg/zc3mbnwx42s7nk1ndm_fv5tw0000gn/T/pip-build-env-0fk0y7e4/overlay/lib/python3.8/site-packages/setuptools/config/setupcfg.py:508: SetuptoolsDeprecationWarning: The license_file parameter is deprecated, use license_files instead.
        warnings.warn(msg, warning_class)
      warning: no files found matching '*.png' under directory 'docs'
      warning: no files found matching '*.svg' under directory 'docs'
      no previously-included directories found matching 'docs/_build'
      no previously-included directories found matching 'docs/_output'
      adding license file 'LICENSE'
      adding license file 'licenses/LICENSE_APACHE'
      running build_ext
      building 'backports.zoneinfo._czoneinfo' extension
      lib/zoneinfo_module.c:1:10: fatal error: 'Python.h' file not found
      #include "Python.h"
               ^~~~~~~~~~
      1 error generated.
      error: command '/usr/bin/clang' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for backports.zoneinfo
Failed to build backports.zoneinfo
ERROR: Could not build wheels for backports.zoneinfo, which is required to install pyproject.toml-based project

Вернуться на верх