ERROR: Could not build wheels for aiohttp, which is required to install pyproject.toml-based
Asked Answered
D

2

8

Newbie here.

I have been trying to installen the openai library into python, but I keep running into problems. I have already installed C++ libraries.

It seems to have problems specific with aio http, and I get the error below. I a running a Windows 11 laptop without admin restrictions.

Error

"C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.37.32822\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IC:\Users\sande\AppData\Local\Programs\Python\Python312\include -IC:\Users\sande\AppData\Local\Programs\Python\Python312\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.37.32822\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\cppwinrt" /Tcaiohttp/_websocket.c /Fobuild\temp.win-amd64-cpython-312\Release\aiohttp/_websocket.obj
      _websocket.c
      aiohttp/_websocket.c(1475): warning C4996: 'Py_OptimizeFlag': deprecated in 3.12
      aiohttp/_websocket.c(3042): error C2039: 'ob_digit': is not a member of '_longobject'

[end of output]

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

ERROR: Failed building wheel for aiohttp

Failed to build aiohttp

ERROR: Could not build wheels for aiohttp, which is required to install pyproject.toml-based projects
Duplessis answered 30/10, 2023 at 13:8 Comment(2)
G
10

Either use python 3.11

or

pip install aiohttp==3.9.0b0

installs their current beta release that supports python 3.12.x

then try openai installation


Link to git :https://github.com/KillianLucas/open-interpreter/issues/581

Grandmamma answered 30/10, 2023 at 13:15 Comment(0)
B
0

As of February the 1st 2024, multidict released a wheel for Python 3.12.

You can download it here, but it will also be updated over the coming days in the affected libraries. aiohttp as an example updated theirs today (02-02-2024).

Official Github link

Bootjack answered 2/2, 2024 at 12:0 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.