aio-libs / aiohttp

Asynchronous HTTP client/server framework for asyncio and Python
https://docs.aiohttp.org
Other
15.11k stars 2.02k forks source link

Building wheel for aiohttp (pyproject.toml) did not run successfully.  ←when I enterd pip install chess.com in command prompt #8178

Closed kei1126 closed 8 months ago

kei1126 commented 8 months ago

Describe the bug

why I can`t install chess.com API

To Reproduce

C:\Users\kei20\Python>pip install chess.com Collecting chess.com Using cached chess.com-2.1.0-py3-none-any.whl.metadata (4.0 kB) Collecting aiohttp==3.8.3 (from chess.com) Using cached aiohttp-3.8.3.tar.gz (7.3 MB) Installing build dependencies ... done Getting requirements to build wheel ... done Installing backend dependencies ... done Preparing metadata (pyproject.toml) ... done Collecting requests==2.28.0 (from chess.com) Using cached requests-2.28.0-py3-none-any.whl (62 kB) Requirement already satisfied: attrs>=17.3.0 in c:\users\kei20\lib\site-packages (from aiohttp==3.8.3->chess.com) (23.2.0) Collecting charset-normalizer<3.0,>=2.0 (from aiohttp==3.8.3->chess.com) Using cached charset_normalizer-2.1.1-py3-none-any.whl.metadata (11 kB) Requirement already satisfied: multidict<7.0,>=4.5 in c:\users\kei20\lib\site-packages (from aiohttp==3.8.3->chess.com) (6.0.5) Collecting async-timeout<5.0,>=4.0.0a3 (from aiohttp==3.8.3->chess.com) Using cached async_timeout-4.0.3-py3-none-any.whl.metadata (4.2 kB) Requirement already satisfied: yarl<2.0,>=1.0 in c:\users\kei20\lib\site-packages (from aiohttp==3.8.3->chess.com) (1.9.4) Requirement already satisfied: frozenlist>=1.1.1 in c:\users\kei20\lib\site-packages (from aiohttp==3.8.3->chess.com) (1.4.1) Requirement already satisfied: aiosignal>=1.1.2 in c:\users\kei20\lib\site-packages (from aiohttp==3.8.3->chess.com) (1.3.1) Collecting charset-normalizer<3.0,>=2.0 (from aiohttp==3.8.3->chess.com) Using cached charset_normalizer-2.0.12-py3-none-any.whl (39 kB) Requirement already satisfied: idna<4,>=2.5 in c:\users\kei20\lib\site-packages (from requests==2.28.0->chess.com) (3.6) Collecting urllib3<1.27,>=1.21.1 (from requests==2.28.0->chess.com) Using cached urllib3-1.26.18-py2.py3-none-any.whl.metadata (48 kB) Requirement already satisfied: certifi>=2017.4.17 in c:\users\kei20\lib\site-packages (from requests==2.28.0->chess.com) (2024.2.2) Using cached chess.com-2.1.0-py3-none-any.whl (11 kB) Using cached async_timeout-4.0.3-py3-none-any.whl (5.7 kB) Using cached urllib3-1.26.18-py2.py3-none-any.whl (143 kB) Building wheels for collected packages: aiohttp 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 ╰─> [110 lines of output]


  * Accelerated build *
  *********************
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build\lib.win-amd64-cpython-312
  creating build\lib.win-amd64-cpython-312\aiohttp
  copying aiohttp\abc.py -> build\lib.win-amd64-cpython-312\aiohttp
  copying aiohttp\base_protocol.py -> build\lib.win-amd64-cpython-312\aiohttp
  copying aiohttp\client.py -> build\lib.win-amd64-cpython-312\aiohttp
  copying aiohttp\client_exceptions.py -> build\lib.win-amd64-cpython-312\aiohttp
  copying aiohttp\client_proto.py -> build\lib.win-amd64-cpython-312\aiohttp
  copying aiohttp\client_reqrep.py -> build\lib.win-amd64-cpython-312\aiohttp
  copying aiohttp\client_ws.py -> build\lib.win-amd64-cpython-312\aiohttp
  copying aiohttp\connector.py -> build\lib.win-amd64-cpython-312\aiohttp
  copying aiohttp\cookiejar.py -> build\lib.win-amd64-cpython-312\aiohttp
  copying aiohttp\formdata.py -> build\lib.win-amd64-cpython-312\aiohttp
  copying aiohttp\hdrs.py -> build\lib.win-amd64-cpython-312\aiohttp
  copying aiohttp\helpers.py -> build\lib.win-amd64-cpython-312\aiohttp
  copying aiohttp\http.py -> build\lib.win-amd64-cpython-312\aiohttp
  copying aiohttp\http_exceptions.py -> build\lib.win-amd64-cpython-312\aiohttp
  copying aiohttp\http_parser.py -> build\lib.win-amd64-cpython-312\aiohttp
  copying aiohttp\http_websocket.py -> build\lib.win-amd64-cpython-312\aiohttp
  copying aiohttp\http_writer.py -> build\lib.win-amd64-cpython-312\aiohttp
  copying aiohttp\locks.py -> build\lib.win-amd64-cpython-312\aiohttp
  copying aiohttp\log.py -> build\lib.win-amd64-cpython-312\aiohttp
  copying aiohttp\multipart.py -> build\lib.win-amd64-cpython-312\aiohttp
  copying aiohttp\payload.py -> build\lib.win-amd64-cpython-312\aiohttp
  copying aiohttp\payload_streamer.py -> build\lib.win-amd64-cpython-312\aiohttp
  copying aiohttp\pytest_plugin.py -> build\lib.win-amd64-cpython-312\aiohttp
  copying aiohttp\resolver.py -> build\lib.win-amd64-cpython-312\aiohttp
  copying aiohttp\streams.py -> build\lib.win-amd64-cpython-312\aiohttp
  copying aiohttp\tcp_helpers.py -> build\lib.win-amd64-cpython-312\aiohttp
  copying aiohttp\test_utils.py -> build\lib.win-amd64-cpython-312\aiohttp
  copying aiohttp\tracing.py -> build\lib.win-amd64-cpython-312\aiohttp
  copying aiohttp\typedefs.py -> build\lib.win-amd64-cpython-312\aiohttp
  copying aiohttp\web.py -> build\lib.win-amd64-cpython-312\aiohttp
  copying aiohttp\web_app.py -> build\lib.win-amd64-cpython-312\aiohttp
  copying aiohttp\web_exceptions.py -> build\lib.win-amd64-cpython-312\aiohttp
  copying aiohttp\web_fileresponse.py -> build\lib.win-amd64-cpython-312\aiohttp
  copying aiohttp\web_log.py -> build\lib.win-amd64-cpython-312\aiohttp
  copying aiohttp\web_middlewares.py -> build\lib.win-amd64-cpython-312\aiohttp
  copying aiohttp\web_protocol.py -> build\lib.win-amd64-cpython-312\aiohttp
  copying aiohttp\web_request.py -> build\lib.win-amd64-cpython-312\aiohttp
  copying aiohttp\web_response.py -> build\lib.win-amd64-cpython-312\aiohttp
  copying aiohttp\web_routedef.py -> build\lib.win-amd64-cpython-312\aiohttp
  copying aiohttp\web_runner.py -> build\lib.win-amd64-cpython-312\aiohttp
  copying aiohttp\web_server.py -> build\lib.win-amd64-cpython-312\aiohttp
  copying aiohttp\web_urldispatcher.py -> build\lib.win-amd64-cpython-312\aiohttp
  copying aiohttp\web_ws.py -> build\lib.win-amd64-cpython-312\aiohttp
  copying aiohttp\worker.py -> build\lib.win-amd64-cpython-312\aiohttp
  copying aiohttp\__init__.py -> build\lib.win-amd64-cpython-312\aiohttp
  running egg_info
  writing aiohttp.egg-info\PKG-INFO
  writing dependency_links to aiohttp.egg-info\dependency_links.txt
  writing requirements to aiohttp.egg-info\requires.txt
  writing top-level names to aiohttp.egg-info\top_level.txt
  reading manifest file 'aiohttp.egg-info\SOURCES.txt'
  reading manifest template 'MANIFEST.in'
  warning: no files found matching 'aiohttp' anywhere in distribution
  warning: no previously-included files matching '*.pyc' found anywhere in distribution
  warning: no previously-included files matching '*.pyd' found anywhere in distribution
  warning: no previously-included files matching '*.so' found anywhere in distribution
  warning: no previously-included files matching '*.lib' found anywhere in distribution
  warning: no previously-included files matching '*.dll' found anywhere in distribution
  warning: no previously-included files matching '*.a' found anywhere in distribution
  warning: no previously-included files matching '*.obj' found anywhere in distribution
  warning: no previously-included files found matching 'aiohttp\*.html'
  no previously-included directories found matching 'docs\_build'
  adding license file 'LICENSE.txt'
  writing manifest file 'aiohttp.egg-info\SOURCES.txt'
  copying aiohttp\_cparser.pxd -> build\lib.win-amd64-cpython-312\aiohttp
  copying aiohttp\_find_header.pxd -> build\lib.win-amd64-cpython-312\aiohttp
  copying aiohttp\_headers.pxi -> build\lib.win-amd64-cpython-312\aiohttp
  copying aiohttp\_helpers.pyi -> build\lib.win-amd64-cpython-312\aiohttp
  copying aiohttp\_helpers.pyx -> build\lib.win-amd64-cpython-312\aiohttp
  copying aiohttp\_http_parser.pyx -> build\lib.win-amd64-cpython-312\aiohttp
  copying aiohttp\_http_writer.pyx -> build\lib.win-amd64-cpython-312\aiohttp
  copying aiohttp\_websocket.pyx -> build\lib.win-amd64-cpython-312\aiohttp
  copying aiohttp\py.typed -> build\lib.win-amd64-cpython-312\aiohttp
  creating build\lib.win-amd64-cpython-312\aiohttp\.hash
  copying aiohttp\.hash\_cparser.pxd.hash -> build\lib.win-amd64-cpython-312\aiohttp\.hash
  copying aiohttp\.hash\_find_header.pxd.hash -> build\lib.win-amd64-cpython-312\aiohttp\.hash
  copying aiohttp\.hash\_helpers.pyi.hash -> build\lib.win-amd64-cpython-312\aiohttp\.hash
  copying aiohttp\.hash\_helpers.pyx.hash -> build\lib.win-amd64-cpython-312\aiohttp\.hash
  copying aiohttp\.hash\_http_parser.pyx.hash -> build\lib.win-amd64-cpython-312\aiohttp\.hash
  copying aiohttp\.hash\_http_writer.pyx.hash -> build\lib.win-amd64-cpython-312\aiohttp\.hash
  copying aiohttp\.hash\_websocket.pyx.hash -> build\lib.win-amd64-cpython-312\aiohttp\.hash
  copying aiohttp\.hash\hdrs.py.hash -> build\lib.win-amd64-cpython-312\aiohttp\.hash
  running build_ext
  building 'aiohttp._websocket' extension
  creating build\temp.win-amd64-cpython-312
  creating build\temp.win-amd64-cpython-312\Release
  creating build\temp.win-amd64-cpython-312\Release\aiohttp
  "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.39.33519\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IC:\Users\kei20\include -IC:\Users\kei20\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.39.33519\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'
  C:\Users\kei20\include\cpython/longintrepr.h(87): note: see declaration of '_longobject'
  aiohttp/_websocket.c(3097): error C2039: 'ob_digit': is not a member of '_longobject'
  C:\Users\kei20\include\cpython/longintrepr.h(87): note: see declaration of '_longobject'
  aiohttp/_websocket.c(3238): error C2039: 'ob_digit': is not a member of '_longobject'
  C:\Users\kei20\include\cpython/longintrepr.h(87): note: see declaration of '_longobject'
  aiohttp/_websocket.c(3293): error C2039: 'ob_digit': is not a member of '_longobject'
  C:\Users\kei20\include\cpython/longintrepr.h(87): note: see declaration of '_longobject'
  aiohttp/_websocket.c(3744): error C2039: 'ob_digit': is not a member of '_longobject'
  C:\Users\kei20\include\cpython/longintrepr.h(87): note: see declaration of '_longobject'
  error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.39.33519\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
  [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

Expected behavior

I want to API of chess.com

Logs/tracebacks

I

Python Version

$ python --version
3.11

aiohttp Version

$ python -m pip show aiohttp

multidict Version

$ python -m pip show multidict

yarl Version

$ python -m pip show yarl

OS

Windows

Related component

Server

Additional context

No response

Code of Conduct

Dreamsorcerer commented 8 months ago

aiohttp 3.8 doesn't support Python 3.12. Use the latest version.

kei1126 commented 8 months ago

Collecting aiohttp==3.9.3 Downloading aiohttp-3.9.3-cp312-cp312-win_amd64.whl.metadata (7.6 kB) Requirement already satisfied: aiosignal>=1.1.2 in c:\users\kei20\lib\site-packages (from aiohttp==3.9.3) (1.3.1) Requirement already satisfied: attrs>=17.3.0 in c:\users\kei20\lib\site-packages (from aiohttp==3.9.3) (23.2.0) Requirement already satisfied: frozenlist>=1.1.1 in c:\users\kei20\lib\site-packages (from aiohttp==3.9.3) (1.4.1) Requirement already satisfied: multidict<7.0,>=4.5 in c:\users\kei20\lib\site-packages (from aiohttp==3.9.3) (6.0.5) Requirement already satisfied: yarl<2.0,>=1.0 in c:\users\kei20\lib\site-packages (from aiohttp==3.9.3) (1.9.4) Requirement already satisfied: idna>=2.0 in c:\users\kei20\lib\site-packages (from yarl<2.0,>=1.0->aiohttp==3.9.3) (3.6) Downloading aiohttp-3.9.3-cp312-cp312-win_amd64.whl (363 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 363.4/363.4 kB 3.8 MB/s eta 0:00:00 Installing collected packages: aiohttp Attempting uninstall: aiohttp Found existing installation: aiohttp 3.7.0b0 Uninstalling aiohttp-3.7.0b0: Successfully uninstalled aiohttp-3.7.0b0 Successfully installed aiohttp-3.9.3

C:\Users\kei20>pip install chess.com Collecting chess.com Using cached chess.com-2.1.0-py3-none-any.whl.metadata (4.0 kB) Collecting aiohttp==3.8.3 (from chess.com) Using cached aiohttp-3.8.3.tar.gz (7.3 MB) Installing build dependencies ... done Getting requirements to build wheel ... done Installing backend dependencies ... done Preparing metadata (pyproject.toml) ... done Collecting requests==2.28.0 (from chess.com) Downloading requests-2.28.0-py3-none-any.whl.metadata (4.6 kB) Requirement already satisfied: attrs>=17.3.0 in c:\users\kei20\lib\site-packages (from aiohttp==3.8.3->chess.com) (23.2.0) Collecting charset-normalizer<3.0,>=2.0 (from aiohttp==3.8.3->chess.com) Using cached charset_normalizer-2.1.1-py3-none-any.whl.metadata (11 kB) Requirement already satisfied: multidict<7.0,>=4.5 in c:\users\kei20\lib\site-packages (from aiohttp==3.8.3->chess.com) (6.0.5) Collecting async-timeout<5.0,>=4.0.0a3 (from aiohttp==3.8.3->chess.com) Using cached async_timeout-4.0.3-py3-none-any.whl.metadata (4.2 kB) Requirement already satisfied: yarl<2.0,>=1.0 in c:\users\kei20\lib\site-packages (from aiohttp==3.8.3->chess.com) (1.9.4) Requirement already satisfied: frozenlist>=1.1.1 in c:\users\kei20\lib\site-packages (from aiohttp==3.8.3->chess.com) (1.4.1) Requirement already satisfied: aiosignal>=1.1.2 in c:\users\kei20\lib\site-packages (from aiohttp==3.8.3->chess.com) (1.3.1) Collecting charset-normalizer<3.0,>=2.0 (from aiohttp==3.8.3->chess.com) Using cached charset_normalizer-2.0.12-py3-none-any.whl (39 kB) Requirement already satisfied: idna<4,>=2.5 in c:\users\kei20\lib\site-packages (from requests==2.28.0->chess.com) (3.6) Collecting urllib3<1.27,>=1.21.1 (from requests==2.28.0->chess.com) Using cached urllib3-1.26.18-py2.py3-none-any.whl.metadata (48 kB) Requirement already satisfied: certifi>=2017.4.17 in c:\users\kei20\lib\site-packages (from requests==2.28.0->chess.com) (2024.2.2) Using cached chess.com-2.1.0-py3-none-any.whl (11 kB) Using cached requests-2.28.0-py3-none-any.whl (62 kB) Using cached async_timeout-4.0.3-py3-none-any.whl (5.7 kB) Using cached urllib3-1.26.18-py2.py3-none-any.whl (143 kB) Building wheels for collected packages: aiohttp 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

I can`t solve if I did it

webknjaz commented 8 months ago

If another library sets an older incompatible version of aiohttp in their dependencies, you'll have to wait until they update it. It's not a problem with aiohttp but with what you install.

Dreamsorcerer commented 8 months ago

i.e. Register a bug with chess.com and ask them to stop pinning aiohttp (or update their version more frequently).

kei1126 commented 8 months ago

than you for telling me