black: black[d] - ERROR: Could not build wheels for aiohttp, frozenlist, multidict, yarl, which is required to install pyproject.toml-based projects

I want to install ˙black[d]˙ in Windows 11 64 bit.

pip install 'black[d]'
...
      building 'yarl._quoting_c' extension
      error: --plat-name must be one of ('win32', 'win-amd64', 'win-arm32', 'win-arm64')
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for yarl
Failed to build aiohttp frozenlist multidict yarl
ERROR: Could not build wheels for aiohttp, frozenlist, multidict, yarl, which is required to install pyproject.toml-based projects

To Reproduce

  1. Open PowerShell (or normal terminal)
  2. run pip install 'black[d]'
  3. install ends with error

black setup.py is works fine

The resulting error is:

ERROR: Could not build wheels for aiohttp, frozenlist, multidict, yarl, which is required to install pyproject.toml-based projects

Expected behavior

install it.

Environment

  • Black’s version: black, 22.12.0 (compiled: no)
  • OS and Python version: e.g. win11/Python (CPython) 3.8.9

Additional context

pip-install-blackd.txt

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 21 (1 by maintainers)

Most upvoted comments

You’re using mingw-compiled Python as opposed to the regular Visual Studio-compiled one. Wheels between those are not compatible and yarl does not provide mingw wheels nor does it seem to be buildable on such configuration. It is generally recommended to use python.org-provided Python builds on Windows.

same problem with me while installing openai and streamlit

The error is solved by installing Microsoft C++ Build Tools https://visualstudio.microsoft.com/es/visual-cpp-build-tools/