Closed iconFehu closed 10 months ago
python版本:3.12.1 aiohttp当前已支持3.12的python版本,可以将aiohttp版本依赖升级到3.9.1 以下是安装日志,中途报错
Collecting bilibili-api-python Using cached bilibili_api_python-16.1.1-py3-none-any.whl.metadata (9.0 kB) Collecting aiohttp~=3.8.6 (from bilibili-api-python) Using cached aiohttp-3.8.6.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 beautifulsoup4~=4.12.2 (from bilibili-api-python) Using cached beautifulsoup4-4.12.2-py3-none-any.whl (142 kB) Requirement already satisfied: colorama~=0.4.6 in c:\users\q9877\pycharmprojects\bilibili-bot\.venv\lib\site-packages (from bilibili-api-python) (0.4.6) Collecting lxml~=4.9.3 (from bilibili-api-python) Using cached lxml-4.9.3-cp312-cp312-win_amd64.whl.metadata (3.9 kB) Collecting pyyaml~=6.0 (from bilibili-api-python) Using cached PyYAML-6.0.1-cp312-cp312-win_amd64.whl.metadata (2.1 kB) Collecting brotli~=1.1.0 (from bilibili-api-python) Using cached Brotli-1.1.0-cp312-cp312-win_amd64.whl.metadata (5.6 kB) Collecting httpx~=0.24.1 (from bilibili-api-python) Using cached httpx-0.24.1-py3-none-any.whl.metadata (7.4 kB) Collecting qrcode~=7.4.2 (from bilibili-api-python) Using cached qrcode-7.4.2-py3-none-any.whl (46 kB) Requirement already satisfied: requests~=2.31.0 in c:\users\q9877\pycharmprojects\bilibili-bot\.venv\lib\site-packages (from bilibili-api-python) (2.31.0) Collecting APScheduler~=3.10.4 (from bilibili-api-python) Using cached APScheduler-3.10.4-py3-none-any.whl.metadata (5.7 kB) Collecting rsa~=4.9 (from bilibili-api-python) Using cached rsa-4.9-py3-none-any.whl (34 kB) Collecting pillow~=10.0.1 (from bilibili-api-python) Using cached Pillow-10.0.1-cp312-cp312-win_amd64.whl.metadata (9.6 kB) Collecting tqdm~=4.66.1 (from bilibili-api-python) Using cached tqdm-4.66.1-py3-none-any.whl.metadata (57 kB) Requirement already satisfied: yarl~=1.9.2 in c:\users\q9877\pycharmprojects\bilibili-bot\.venv\lib\site-packages (from bilibili-api-python) (1.9.4) Collecting pycryptodomex~=3.19.0 (from bilibili-api-python) Using cached pycryptodomex-3.19.0-cp35-abi3-win_amd64.whl.metadata (3.4 kB) Collecting qrcode-terminal~=0.8 (from bilibili-api-python) Using cached qrcode_terminal-0.8-py3-none-any.whl Requirement already satisfied: attrs>=17.3.0 in c:\users\q9877\pycharmprojects\bilibili-bot\.venv\lib\site-packages (from aiohttp~=3.8.6->bilibili-api-python) (23.1.0) Requirement already satisfied: charset-normalizer<4.0,>=2.0 in c:\users\q9877\pycharmprojects\bilibili-bot\.venv\lib\site-packages (from aiohttp~=3.8.6->bilibili-api-python) (3.3.2) Requirement already satisfied: multidict<7.0,>=4.5 in c:\users\q9877\pycharmprojects\bilibili-bot\.venv\lib\site-packages (from aiohttp~=3.8.6->bilibili-api-python) (6.0.4) Collecting async-timeout<5.0,>=4.0.0a3 (from aiohttp~=3.8.6->bilibili-api-python) Using cached async_timeout-4.0.3-py3-none-any.whl.metadata (4.2 kB) Requirement already satisfied: frozenlist>=1.1.1 in c:\users\q9877\pycharmprojects\bilibili-bot\.venv\lib\site-packages (from aiohttp~=3.8.6->bilibili-api-python) (1.4.1) Requirement already satisfied: aiosignal>=1.1.2 in c:\users\q9877\pycharmprojects\bilibili-bot\.venv\lib\site-packages (from aiohttp~=3.8.6->bilibili-api-python) (1.3.1) Requirement already satisfied: six>=1.4.0 in c:\users\q9877\pycharmprojects\bilibili-bot\.venv\lib\site-packages (from APScheduler~=3.10.4->bilibili-api-python) (1.16.0) Collecting pytz (from APScheduler~=3.10.4->bilibili-api-python) Using cached pytz-2023.3.post1-py2.py3-none-any.whl.metadata (22 kB) Collecting tzlocal!=3.*,>=2.0 (from APScheduler~=3.10.4->bilibili-api-python) Using cached tzlocal-5.2-py3-none-any.whl.metadata (7.8 kB) Collecting soupsieve>1.2 (from beautifulsoup4~=4.12.2->bilibili-api-python) Using cached soupsieve-2.5-py3-none-any.whl.metadata (4.7 kB) Requirement already satisfied: certifi in c:\users\q9877\pycharmprojects\bilibili-bot\.venv\lib\site-packages (from httpx~=0.24.1->bilibili-api-python) (2023.11.17) Collecting httpcore<0.18.0,>=0.15.0 (from httpx~=0.24.1->bilibili-api-python) Using cached httpcore-0.17.3-py3-none-any.whl.metadata (18 kB) Requirement already satisfied: idna in c:\users\q9877\pycharmprojects\bilibili-bot\.venv\lib\site-packages (from httpx~=0.24.1->bilibili-api-python) (3.6) Requirement already satisfied: sniffio in c:\users\q9877\pycharmprojects\bilibili-bot\.venv\lib\site-packages (from httpx~=0.24.1->bilibili-api-python) (1.3.0) Requirement already satisfied: typing-extensions in c:\users\q9877\pycharmprojects\bilibili-bot\.venv\lib\site-packages (from qrcode~=7.4.2->bilibili-api-python) (4.9.0) Collecting pypng (from qrcode~=7.4.2->bilibili-api-python) Using cached pypng-0.20220715.0-py3-none-any.whl (58 kB) Requirement already satisfied: urllib3<3,>=1.21.1 in c:\users\q9877\pycharmprojects\bilibili-bot\.venv\lib\site-packages (from requests~=2.31.0->bilibili-api-python) (2.1.0) Collecting pyasn1>=0.1.3 (from rsa~=4.9->bilibili-api-python) Using cached pyasn1-0.5.1-py2.py3-none-any.whl.metadata (8.6 kB) Requirement already satisfied: h11<0.15,>=0.13 in c:\users\q9877\pycharmprojects\bilibili-bot\.venv\lib\site-packages (from httpcore<0.18.0,>=0.15.0->httpx~=0.24.1->bilibili-api-python) (0.14.0) Requirement already satisfied: anyio<5.0,>=3.0 in c:\users\q9877\pycharmprojects\bilibili-bot\.venv\lib\site-packages (from httpcore<0.18.0,>=0.15.0->httpx~=0.24.1->bilibili-api-python) (3.7.1) Collecting tzdata (from tzlocal!=3.*,>=2.0->APScheduler~=3.10.4->bilibili-api-python) Using cached tzdata-2023.3-py2.py3-none-any.whl (341 kB) Using cached bilibili_api_python-16.1.1-py3-none-any.whl (451 kB) Using cached APScheduler-3.10.4-py3-none-any.whl (59 kB) Using cached Brotli-1.1.0-cp312-cp312-win_amd64.whl (357 kB) Using cached httpx-0.24.1-py3-none-any.whl (75 kB) Using cached lxml-4.9.3-cp312-cp312-win_amd64.whl (3.8 MB) Using cached Pillow-10.0.1-cp312-cp312-win_amd64.whl (2.5 MB) Using cached pycryptodomex-3.19.0-cp35-abi3-win_amd64.whl (1.7 MB) Using cached PyYAML-6.0.1-cp312-cp312-win_amd64.whl (138 kB) Using cached tqdm-4.66.1-py3-none-any.whl (78 kB) Using cached async_timeout-4.0.3-py3-none-any.whl (5.7 kB) Using cached httpcore-0.17.3-py3-none-any.whl (74 kB) Using cached pyasn1-0.5.1-py2.py3-none-any.whl (84 kB) Using cached soupsieve-2.5-py3-none-any.whl (36 kB) Using cached tzlocal-5.2-py3-none-any.whl (17 kB) Using cached pytz-2023.3.post1-py2.py3-none-any.whl (502 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.38.33130\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IC:\ Users\q9877\PycharmProjects\bilibili-bot\.venv\include -IC:\Users\q9877\AppData\Local\Programs\Python\Python312\include -IC:\Users\q9877\AppData\Local\Programs\P ython\Python312\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.38.33130\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 Kit s\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": 不是 "_longobject" 的成员 C:\Users\q9877\AppData\Local\Programs\Python\Python312\include\cpython/longintrepr.h(87): note: 参见“_longobject”的声明 aiohttp/_websocket.c(3097): error C2039: "ob_digit": 不是 "_longobject" 的成员 C:\Users\q9877\AppData\Local\Programs\Python\Python312\include\cpython/longintrepr.h(87): note: 参见“_longobject”的声明 aiohttp/_websocket.c(3238): error C2039: "ob_digit": 不是 "_longobject" 的成员 C:\Users\q9877\AppData\Local\Programs\Python\Python312\include\cpython/longintrepr.h(87): note: 参见“_longobject”的声明 aiohttp/_websocket.c(3293): error C2039: "ob_digit": 不是 "_longobject" 的成员 C:\Users\q9877\AppData\Local\Programs\Python\Python312\include\cpython/longintrepr.h(87): note: 参见“_longobject”的声明 aiohttp/_websocket.c(3744): error C2039: "ob_digit": 不是 "_longobject" 的成员 C:\Users\q9877\AppData\Local\Programs\Python\Python312\include\cpython/longintrepr.h(87): note: 参见“_longobject”的声明 error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.38.33130\\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
同样建议,目前Python 3.12版本无法安装bilibili_api_python,需要在依赖中把aiohttp的版本升级到3.9以上
现在python3.12.1无法安装的可以试试 pip install git+https://github.com/iconFehu/bilibili-api.git@main
pip install git+https://github.com/iconFehu/bilibili-api.git@main
python版本:3.12.1 aiohttp当前已支持3.12的python版本,可以将aiohttp版本依赖升级到3.9.1 以下是安装日志,中途报错