Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
kamarton opened this issue Jan 8, 2023 · 21 comments
Labels
C: packaging Installation and packaging of Black T: bug Something isn't working T: user support OP looking for assistance or answers to a question

Comments

@kamarton
Copy link

kamarton commented Jan 8, 2023

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

@kamarton kamarton added the T: bug Something isn't working label Jan 8, 2023
@ichard26 ichard26 added T: user support OP looking for assistance or answers to a question C: packaging Installation and packaging of Black labels Jan 8, 2023
@ichard26
Copy link
Collaborator

ichard26 commented Jan 8, 2023

Are you on 32-bit or ARM Windows? I'm a little confused as Black, aiohttp and the rest of those packages should have wheels for Python 3.8 on Windows, in other words, they should install without issue. Could you try upgrading your pip and also install setuptools and wheel?

@kamarton
Copy link
Author

kamarton commented Jan 8, 2023

The error is still exists.

Could you try upgrading your pip and also install setuptools and wheel?

> python --version
Python 3.10.8
pip --version
pip 22.3.1 from C:\Users\smarton-hp\.local\lib\python3.10-mingw_x86_64\site-packages\pip (python 3.10)
> wheel version
wheel 0.38.4
> pip install setuptools
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: setuptools in c:\users\smarton-hp\.local\lib\python3.10-mingw_x86_64\site-packages (65.6.3)

Are you on 32-bit or ARM Windows?

> systeminfo

OS Name:                   Microsoft Windows 11 Pro
OS Version:                10.0.22621 N/A Build 22621
...
OS Build Type:             Multiprocessor Free
...
System Type:               x64-based PC
...

@Jackenmen
Copy link
Contributor

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.

@kamarton
Copy link
Author

kamarton commented Jan 8, 2023

It is generally recommended to use python.org-provided Python builds on Windows.

@Jackenmen thanks, i downloaded python from python.org, and is works fine.

@kamarton kamarton closed this as completed Jan 8, 2023
@Harrikar
Copy link

i need help i am trying to install discord.py and i have tried everything and it doesn't work it says 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 again and again

@crymE-L
Copy link

crymE-L commented Feb 26, 2023

Similar problem to @Harrikar 's... It starts building the wheel and gives an error: subprocess-exited-with-error

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

@crymE-L
Copy link

crymE-L commented Feb 26, 2023

I literally just found the solution after commenting.

pip install -e . worked for me.

@Harrikar
Copy link

thank you

@Harrikar
Copy link

but for me it doesn't work though

@ichard26
Copy link
Collaborator

Are any of you trying to install Black? @Harrikar this isn't discord.py's GitHub repository. @crymE-L no where in Black's dependency tree do we depend on chain.

We are not a support forum for general Python help.

@IndetectMB
Copy link

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

@IndetectMB
Copy link

¿Alguno de ustedes está intentando instalar Black?@HarrikarEste no es el repositorio GitHub de discord.py.@crymE-LEn ningún lugar del árbol de dependencia de Black dependemos chain.

No somos un foro de soporte para ayuda general de Python.

You are absolutely right, these types of questions should not be here.

@selvigp
Copy link

selvigp commented Oct 10, 2023

I am getting below error messages when I try to build images for python app sample repository. Did anyone find solutions for the same.

@selvigp
Copy link

selvigp commented Oct 10, 2023

`Building wheels for collected packages: aiohttp, frozenlist, multidict, yarl
  Building wheel for aiohttp (pyproject.toml): started
  Building wheel for aiohttp (pyproject.toml): finished with status 'error'
  error: subprocess-exited-with-error
  
  × Building wheel for aiohttp (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [160 lines of output]
      *********************
      * Accelerated build *
      *********************
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-cpython-312
      creating build/lib.linux-x86_64-cpython-312/aiohttp
      copying aiohttp/pytest_plugin.py -> build/lib.linux-x86_64-cpython-312/aiohttp
      copying aiohttp/web_urldispatcher.py -> build/lib.linux-x86_64-cpython-312/aiohttp
      copying aiohttp/web.py -> build/lib.linux-x86_64-cpython-312/aiohttp
      copying aiohttp/web_runner.py -> build/lib.linux-x86_64-cpython-312/aiohttp`

uilding wheels for collected packages: aiohttp, frozenlist, multidict, yarl
Building wheel for aiohttp (pyproject.toml): started
Building wheel for aiohttp (pyproject.toml): finished with status 'error'
error: subprocess-exited-with-error


  error: command '/usr/bin/gcc' 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 aiohttp
Building wheel for frozenlist (pyproject.toml): started
Building wheel for frozenlist (pyproject.toml): finished with status 'done'
Created wheel for frozenlist: filename=frozenlist-1.4.0-cp312-cp312-linux_x86_64.whl size=261461 sha256=c4c8f2b3adf7ac83f28be07c9ba77691896df21dabb444cba865ccdff69ef48a
Stored in directory: /root/.cache/pip/wheels/f1/9c/94/9386cb0ea511a93226456388d41d35f1c24ba15a62ffd7b1ef
Building wheel for multidict (pyproject.toml): started
Building wheel for multidict (pyproject.toml): finished with status 'done'
Created wheel for multidict: filename=multidict-6.0.4-cp312-cp312-linux_x86_64.whl size=114928 sha256=8b5b23021ba7288308707e62c5325ac0e711be9bfcd95f429a52975d2e5f378a
Stored in directory: /root/.cache/pip/wheels/f6/d8/ff/3c14a64b8f2ab1aa94ba2888f5a988be6ab446ec5c8d1a82da
Building wheel for yarl (pyproject.toml): started
Building wheel for yarl (pyproject.toml): finished with status 'done'
Created wheel for yarl: filename=yarl-1.9.2-cp312-cp312-linux_x86_64.whl size=285236 sha256=f533c982503ef0eec01c4a3561e0bb99cdc4da780ae06d4729089f5fe1cf55f1
Stored in directory: /root/.cache/pip/wheels/84/e3/6a/7d0fa1abee8e4aa39922b5bd54689b4b5e4269b2821f482a32
Successfully built frozenlist multidict yarl
Failed to build aiohttp
ERROR: Could not build wheels for aiohttp, which is required to install pyproject.toml-based projects
The command '/bin/sh -c set -ex; pip install -r requirements.txt; pip install gunicorn' returned a non-zero code: 1
ERROR
ERROR: build step 0 "gcr.io/cloud-builders/docker" failed: step exited with non-zero status: 1

@selvigp
Copy link

selvigp commented Oct 10, 2023

Any idea

@Kamiikrazy
Copy link

The Aiohttp issue seems to be an issue with Python 3.12.

@Muzamil-Aslam
Copy link

same problem with me while installing openai and streamlit

@nkverma07
Copy link

Building wheel for aiohttp (pyproject.toml) ... error
error: subprocess-exited-with-error

× Building wheel for aiohttp (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [94 lines of output]

building 'aiohttp._websocket' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for aiohttp
Building wheel for frozenlist (pyproject.toml) ... error
error: subprocess-exited-with-error

× Building wheel for frozenlist (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [33 lines of output]

building 'frozenlist._frozenlist' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for frozenlist
Building wheel for multidict (pyproject.toml) ... error
error: subprocess-exited-with-error

× Building wheel for multidict (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [74 lines of output]

building 'multidict._multidict' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for multidict
Building wheel for yarl (pyproject.toml) ... error
error: subprocess-exited-with-error

× Building wheel for yarl (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [49 lines of output]

@H3x37
Copy link

H3x37 commented Oct 28, 2023

same none off these work for me

@Ninjjaak
Copy link

When I install the openai library with "pip install openai", I get the error: Could not build wheels for aiohttp, frozenlist, multidict, yarl, which is required to install pyproject.toml-based projects... any help?

@JelleZijlstra
Copy link
Collaborator

aiohttp doesn't work on Python 3.12 yet; see aio-libs/aiohttp#7739 and related issues. This isn't related to Black and there's nothing we can do about it, so I'm going to lock this issue to stop the people complaining about various unrelated libraries.

@psf psf locked as resolved and limited conversation to collaborators Oct 30, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
C: packaging Installation and packaging of Black T: bug Something isn't working T: user support OP looking for assistance or answers to a question
Projects
None yet
Development

No branches or pull requests