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

Unable to install aiohttp. #7544

Closed PC-Killer closed 1 year ago

PC-Killer commented 1 year ago

Describe the bug

Unable to install aiohttp.

image

To Reproduce

Install Python 3.12.0rc1(64-bit) on Windows 11 Education(Build 22621.ni_release.220506-1250) Then run "pip install aiohttp" Then image

Expected behavior

Successfully installed aiohttp.

Logs/tracebacks

PS C:\Users\PC-Killer> pip install aiohttp
Looking in indexes: https://mirrors.aliyun.com/pypi/simple/
Collecting aiohttp
  Using cached https://mirrors.aliyun.com/pypi/packages/d6/12/6fc7c7dcc84e263940e87cbafca17c1ef28f39dae6c0b10f51e4ccc764ee/aiohttp-3.8.5.tar.gz (7.4 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... done
Collecting attrs>=17.3.0 (from aiohttp)
  Using cached https://mirrors.aliyun.com/pypi/packages/f0/eb/fcb708c7bf5056045e9e98f62b93bd7467eb718b0202e7698eb11d66416c/attrs-23.1.0-py3-none-any.whl (61 kB)
Requirement already satisfied: charset-normalizer<4.0,>=2.0 in c:\users\pc-killer\appdata\local\programs\python\python312\lib\site-packages (from aiohttp) (3.2.0)
Requirement already satisfied: multidict<7.0,>=4.5 in c:\users\pc-killer\appdata\local\programs\python\python312\lib\site-packages (from aiohttp) (6.0.4)
Collecting async-timeout<5.0,>=4.0.0a3 (from aiohttp)
  Using cached https://mirrors.aliyun.com/pypi/packages/a7/fa/e01228c2938de91d47b307831c62ab9e4001e747789d0b05baf779a6488c/async_timeout-4.0.3-py3-none-any.whl (5.7 kB)
Requirement already satisfied: yarl<2.0,>=1.0 in c:\users\pc-killer\appdata\local\programs\python\python312\lib\site-packages (from aiohttp) (1.9.2)
Collecting frozenlist>=1.1.1 (from aiohttp)
  Using cached frozenlist-1.4.0-cp312-cp312-win_amd64.whl
Collecting aiosignal>=1.1.2 (from aiohttp)
  Using cached https://mirrors.aliyun.com/pypi/packages/76/ac/a7305707cb852b7e16ff80eaf5692309bde30e2b1100a1fcacdc8f731d97/aiosignal-1.3.1-py3-none-any.whl (7.6 kB)
Requirement already satisfied: idna>=2.0 in c:\users\pc-killer\appdata\local\programs\python\python312\lib\site-packages (from yarl<2.0,>=1.0->aiohttp) (3.4)
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\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IC:\Users\PC-Killer\AppData\Local\Programs\Python\Python312\include -IC:\Users\PC-Killer\AppData\Local\Programs\Python\Python312\Include "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.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\PC-Killer\AppData\Local\Programs\Python\Python312\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\PC-Killer\AppData\Local\Programs\Python\Python312\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\PC-Killer\AppData\Local\Programs\Python\Python312\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\PC-Killer\AppData\Local\Programs\Python\Python312\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\PC-Killer\AppData\Local\Programs\Python\Python312\include\cpython/longintrepr.h(87): note: see declaration of '_longobject'
      error: command 'C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.37.32822\\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
PS C:\Users\PC-Killer>

Python Version

$ python --version
Python 3.12.0rc1

aiohttp Version

$ python -m pip show aiohttp
WARNING: Package(s) not found: aiohttp

multidict Version

$ python -m pip show multidict
Name: multidict
Version: 6.0.4
Summary: multidict implementation
Home-page: https://github.com/aio-libs/multidict
Author: Andrew Svetlov
Author-email: andrew.svetlov@gmail.com
License: Apache 2
Location: C:\Users\PC-Killer\AppData\Local\Programs\Python\Python312\Lib\site-packages
Requires:
Required-by: yarl

yarl Version

$ python -m pip show yarl
Name: multidict
Version: 6.0.4
Summary: multidict implementation
Home-page: https://github.com/aio-libs/multidict
Author: Andrew Svetlov
Author-email: andrew.svetlov@gmail.com
License: Apache 2
Location: C:\Users\PC-Killer\AppData\Local\Programs\Python\Python312\Lib\site-packages
Requires:
Required-by: yarl
PS C:\Users\PC-Killer> python -m pip show yarl
Name: yarl
Version: 1.9.2
Summary: Yet another URL library
Home-page: https://github.com/aio-libs/yarl/
Author: Andrew Svetlov
Author-email: andrew.svetlov@gmail.com
License: Apache-2.0
Location: C:\Users\PC-Killer\AppData\Local\Programs\Python\Python312\Lib\site-packages
Requires: idna, multidict
Required-by:

OS

Windows 11 Education Build 22621.ni_release.220506-1250 (Chinese Simplefield)

Related component

Server, Client

Additional context

PS C:\Users\PC-Killer> pip list Package Version


aiofiles 23.2.1 asttokens 2.2.1 backcall 0.2.0 beautifulsoup4 4.12.2 certifi 2023.7.22 charset-normalizer 3.2.0 colorama 0.4.6 decorator 5.1.1 executing 1.2.0 idna 3.4 ipython 8.14.0 jedi 0.19.0 markdown-it-py 3.0.0 matplotlib-inline 0.1.6 mdurl 0.1.2 multidict 6.0.4 mypy 1.5.1 mypy-extensions 1.0.0 objprint 0.2.2 parso 0.8.3 pickleshare 0.7.5 Pillow 10.0.0 pip 23.2.1 prompt-toolkit 3.0.39 pure-eval 0.2.2 Pygments 2.16.1 requests 2.31.0 rich 13.5.2 setuptools 68.1.0 six 1.16.0 soupsieve 2.4.1 stack-data 0.6.2 tqdm 4.66.1 traitlets 5.9.0 typing_extensions 4.7.1 urllib3 2.0.4 viztracer 0.15.6 wcwidth 0.2.6 wget 3.2 yarl 1.9.2

Code of Conduct

cdce8p commented 1 year ago

Duplicate of #7229

RubTalha commented 12 months ago

https://stackoverflow.com/questions/77388920/warning-c4996-py-optimizeflag-deprecated-in-3-12-aiohttp-websocket-c3042/77388956#77388956