RyanovskY
@RyanovskY

Почему не устанавливается daphne на windows11?

при попытке установить daphne на винду я получаю такую ошибку:
PS G:\RyanovskY\scripts_for_work\VIRTUOZ_PROJECT_websocket\virtuoz> pip install daphne
Defaulting to user installation because normal site-packages is not writeable
Collecting daphne
  Using cached daphne-4.1.0-py3-none-any.whl.metadata (6.5 kB)
Requirement already satisfied: asgiref<4,>=3.5.2 in c:\users\dimch\appdata\roaming\python\python39\site-packages (from daphne) (3.7.2)
Collecting autobahn>=22.4.2 (from daphne)
  Using cached autobahn-23.6.2.tar.gz (480 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [34 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\dimch\AppData\Local\Temp\pip-install-8grep854\autobahn_df7d23a85ee94c8cbee810064517651e\setup.py", line 257, in <module>
          setup(
        File "C:\Users\dimch\AppData\Roaming\Python\Python39\site-packages\setuptools\__init__.py", line 107, in setup
          return distutils.core.setup(**attrs)
        File "C:\Users\dimch\AppData\Roaming\Python\Python39\site-packages\setuptools\_distutils\core.py", line 147, in setup
          _setup_distribution = dist = klass(attrs)
        File "C:\Users\dimch\AppData\Roaming\Python\Python39\site-packages\setuptools\dist.py", line 496, in __init__
          _Distribution.__init__(
        File "C:\Users\dimch\AppData\Roaming\Python\Python39\site-packages\setuptools\_distutils\dist.py", line 283, in __init__
          self.finalize_options()
        File "C:\Users\dimch\AppData\Roaming\Python\Python39\site-packages\setuptools\dist.py", line 934, in finalize_options
          for ep in sorted(loaded, key=by_order):
        File "C:\Users\dimch\AppData\Roaming\Python\Python39\site-packages\setuptools\dist.py", line 933, in <lambda>
          loaded = map(lambda e: e.load(), filtered)
        File "C:\Users\dimch\AppData\Roaming\Python\Python39\site-packages\setuptools\_vendor\importlib_metadata\__init__.py", line 208, in load
          module = import_module(match.group('module'))
        File "C:\Program Files\Python39\lib\importlib\__init__.py", line 127, in import_module
          return _bootstrap._gcd_import(name[level:], package, level)
        File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
        File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
        File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
        File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
        File "<frozen importlib._bootstrap_external>", line 850, in exec_module
        File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
        File "C:\Users\dimch\AppData\Roaming\Python\Python39\site-packages\py2app\build_app.py", line 37, in <module>
          from py2app.create_appbundle import create_appbundle
        File "C:\Users\dimch\AppData\Roaming\Python\Python39\site-packages\py2app\create_appbundle.py", line 9, in <module>
          from py2app.util import make_exec, makedirs, mergecopy, mergetree, skipscm
        File "C:\Users\dimch\AppData\Roaming\Python\Python39\site-packages\py2app\util.py", line 5, in <module>
          import fcntl
      ModuleNotFoundError: No module named 'fcntl'
      [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.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.


daphne видимо очень нужен для работы с вебсокетом в джанго, в документации написано всё для daphne, но установить его не получается, типа не хватает модуля fcntl, но этот модуль вроде как должен быть установлен вместе с пайтоном, но как я понял он не используется в windows.

Версия пайтон-3.9 кто не увидел в Traceback
  • Вопрос задан
  • 46 просмотров
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Похожие вопросы