Nemo2011 / bilibili-api

哔哩哔哩常用API调用。支持视频、番剧、用户、频道、音频等功能。原仓库地址:https://github.com/MoyuScript/bilibili-api
https://nemo2011.github.io/bilibili-api/
GNU General Public License v3.0
2.24k stars 217 forks source link

brotli 模块安装失败 #96

Closed z0z0r4 closed 2 years ago

z0z0r4 commented 2 years ago

Windows10 python3.10 ![Uploading image.png…]()

安装失败

z0z0r4 commented 2 years ago

H:\Bilibili>pip install brotli Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple Collecting brotli Using cached https://pypi.tuna.tsinghua.edu.cn/packages/6b/11/7d28cd3a5492fed09159e9b37613fdcec7655d93dec664b79d4bb4bb67b8/Brotli-1.0.9-cp310-cp310-win_amd64.whl (383 kB) Installing collected packages: brotli ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. bilibili-api 9.1.0 requires aiohttp~=3.7.4.post0, but you have aiohttp 3.8.3 which is incompatible. bilibili-api 9.1.0 requires beautifulsoup4~=4.9.3, but you have beautifulsoup4 4.11.1 which is incompatible. bilibili-api 9.1.0 requires lxml~=4.6.1, but you have lxml 4.9.1 which is incompatible. bilibili-api 9.1.0 requires pyyaml~=5.4.1, but you have pyyaml 6.0 which is incompatible. Successfully installed brotli-1.0.9

z0z0r4 commented 2 years ago

奇奇怪怪。。 image

image

Nemo2011 commented 2 years ago

把原来的 bilibili_api 卸载,重装 bilibili-api-python, ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. 就是因为旧版本依赖的库版本太旧了所以引起了冲突。

Nemo2011 commented 2 years ago

import bilibili_api.exceptions.ApiException 等重新安装后再尝试运行一下(先试着正常导入模块 import bilibili_api)

z0z0r4 commented 2 years ago

我卸载过了,但是无效...

C:\Users\seewo>pip uninstall bilibili_api
WARNING: Skipping bilibili_api as it is not installed.

C:\Users\seewo>pip install bilibili_api_python
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Requirement already satisfied: bilibili_api_python in c:\users\seewo\appdata\local\programs\python\python310\lib\site-packages (13.1.2)
Requirement already satisfied: urllib3~=1.26.12 in c:\users\seewo\appdata\local\programs\python\python310\lib\site-packages (from bilibili_api_python) (1.26.12)
Requirement already satisfied: pillow~=9.2.0 in c:\users\seewo\appdata\local\programs\python\python310\lib\site-packages (from bilibili_api_python) (9.2.0)
Requirement already satisfied: pyyaml~=6.0 in c:\users\seewo\appdata\local\programs\python\python310\lib\site-packages (from bilibili_api_python) (6.0)
Requirement already satisfied: rsa~=4.9 in c:\users\seewo\appdata\local\programs\python\python310\lib\site-packages (from bilibili_api_python) (4.9)
Requirement already satisfied: aiohttp~=3.8.3 in c:\users\seewo\appdata\local\programs\python\python310\lib\site-packages (from bilibili_api_python) (3.8.3)
Requirement already satisfied: colorama~=0.4.5 in c:\users\seewo\appdata\local\programs\python\python310\lib\site-packages (from bilibili_api_python) (0.4.6)
Requirement already satisfied: keyboard~=0.13.5 in c:\users\seewo\appdata\local\programs\python\python310\lib\site-packages (from bilibili_api_python) (0.13.5)
Requirement already satisfied: beautifulsoup4~=4.11.1 in c:\users\seewo\appdata\local\programs\python\python310\lib\site-packages (from bilibili_api_python) (4.11.1)
Requirement already satisfied: httpx~=0.23.0 in c:\users\seewo\appdata\local\programs\python\python310\lib\site-packages (from bilibili_api_python) (0.23.0)
Requirement already satisfied: requests~=2.28.1 in c:\users\seewo\appdata\local\programs\python\python310\lib\site-packages (from bilibili_api_python) (2.28.1)
Requirement already satisfied: lxml~=4.9.0 in c:\users\seewo\appdata\local\programs\python\python310\lib\site-packages (from bilibili_api_python) (4.9.1)
Requirement already satisfied: APScheduler~=3.9.1 in c:\users\seewo\appdata\local\programs\python\python310\lib\site-packages (from bilibili_api_python) (3.9.1)
Requirement already satisfied: qrcode~=7.3.1 in c:\users\seewo\appdata\local\programs\python\python310\lib\site-packages (from bilibili_api_python) (7.3.1)
Requirement already satisfied: brotli~=1.0.9 in c:\users\seewo\appdata\local\programs\python\python310\lib\site-packages (from bilibili_api_python) (1.0.9)
Requirement already satisfied: frozenlist>=1.1.1 in c:\users\seewo\appdata\local\programs\python\python310\lib\site-packages (from aiohttp~=3.8.3->bilibili_api_python) (1.3.1)
Requirement already satisfied: multidict<7.0,>=4.5 in c:\users\seewo\appdata\local\programs\python\python310\lib\site-packages (from aiohttp~=3.8.3->bilibili_api_python) (6.0.2)
Requirement already satisfied: async-timeout<5.0,>=4.0.0a3 in c:\users\seewo\appdata\local\programs\python\python310\lib\site-packages (from aiohttp~=3.8.3->bilibili_api_python) (4.0.2)
Requirement already satisfied: aiosignal>=1.1.2 in c:\users\seewo\appdata\local\programs\python\python310\lib\site-packages (from aiohttp~=3.8.3->bilibili_api_python) (1.2.0)
Requirement already satisfied: attrs>=17.3.0 in c:\users\seewo\appdata\local\programs\python\python310\lib\site-packages (from aiohttp~=3.8.3->bilibili_api_python) (22.1.0)
Requirement already satisfied: charset-normalizer<3.0,>=2.0 in c:\users\seewo\appdata\local\programs\python\python310\lib\site-packages (from aiohttp~=3.8.3->bilibili_api_python) (2.1.1)
Requirement already satisfied: yarl<2.0,>=1.0 in c:\users\seewo\appdata\local\programs\python\python310\lib\site-packages (from aiohttp~=3.8.3->bilibili_api_python) (1.8.1)
Requirement already satisfied: setuptools>=0.7 in c:\users\seewo\appdata\local\programs\python\python310\lib\site-packages (from APScheduler~=3.9.1->bilibili_api_python) (63.2.0)
Requirement already satisfied: six>=1.4.0 in c:\users\seewo\appdata\local\programs\python\python310\lib\site-packages (from APScheduler~=3.9.1->bilibili_api_python) (1.16.0)
Requirement already satisfied: tzlocal!=3.*,>=2.0 in c:\users\seewo\appdata\local\programs\python\python310\lib\site-packages (from APScheduler~=3.9.1->bilibili_api_python) (4.2)
Requirement already satisfied: pytz in c:\users\seewo\appdata\local\programs\python\python310\lib\site-packages (from APScheduler~=3.9.1->bilibili_api_python) (2022.5)
Requirement already satisfied: soupsieve>1.2 in c:\users\seewo\appdata\local\programs\python\python310\lib\site-packages (from beautifulsoup4~=4.11.1->bilibili_api_python) (2.3.2.post1)
Requirement already satisfied: httpcore<0.16.0,>=0.15.0 in c:\users\seewo\appdata\local\programs\python\python310\lib\site-packages (from httpx~=0.23.0->bilibili_api_python) (0.15.0)
Requirement already satisfied: sniffio in c:\users\seewo\appdata\local\programs\python\python310\lib\site-packages (from httpx~=0.23.0->bilibili_api_python) (1.3.0)
Requirement already satisfied: rfc3986[idna2008]<2,>=1.3 in c:\users\seewo\appdata\local\programs\python\python310\lib\site-packages (from httpx~=0.23.0->bilibili_api_python) (1.5.0)
Requirement already satisfied: certifi in c:\users\seewo\appdata\local\programs\python\python310\lib\site-packages (from httpx~=0.23.0->bilibili_api_python) (2022.9.24)
Requirement already satisfied: idna<4,>=2.5 in c:\users\seewo\appdata\local\programs\python\python310\lib\site-packages (from requests~=2.28.1->bilibili_api_python) (3.4)
Requirement already satisfied: pyasn1>=0.1.3 in c:\users\seewo\appdata\local\programs\python\python310\lib\site-packages (from rsa~=4.9->bilibili_api_python) (0.4.8)
Requirement already satisfied: h11<0.13,>=0.11 in c:\users\seewo\appdata\local\programs\python\python310\lib\site-packages (from httpcore<0.16.0,>=0.15.0->httpx~=0.23.0->bilibili_api_python) (0.12.0)
Requirement already satisfied: anyio==3.* in c:\users\seewo\appdata\local\programs\python\python310\lib\site-packages (from httpcore<0.16.0,>=0.15.0->httpx~=0.23.0->bilibili_api_python) (3.6.2)
Requirement already satisfied: pytz-deprecation-shim in c:\users\seewo\appdata\local\programs\python\python310\lib\site-packages (from tzlocal!=3.*,>=2.0->APScheduler~=3.9.1->bilibili_api_python) (0.1.0.post0)
Requirement already satisfied: tzdata in c:\users\seewo\appdata\local\programs\python\python310\lib\site-packages (from tzlocal!=3.*,>=2.0->APScheduler~=3.9.1->bilibili_api_python) (2022.6)

C:\Users\seewo>python
Python 3.10.7 (tags/v3.10.7:6cc6b13, Sep  5 2022, 14:08:36) [MSC v.1933 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import bilibili_api.exceptions.ApiException
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'bilibili_api.exceptions.ApiException'
>>>
Nemo2011 commented 2 years ago
pip uninstall bilibili-api
pip uninstall bilibili-api-python
pip install bilibili-api-python
z0z0r4 commented 2 years ago

已经放弃了

pip uninstall bilibili-api
pip uninstall bilibili-api-python
pip install bilibili-api-python
Microsoft Windows [版本 10.0.19044.2130]
(c) Microsoft Corporation。保留所有权利。

C:\Users\seewo>pip uninstall bilibili-api
WARNING: Skipping bilibili-api as it is not installed.

C:\Users\seewo>pip uninstall bilibili-api-python
Found existing installation: bilibili-api-python 13.1.2
Uninstalling bilibili-api-python-13.1.2:
  Would remove:
    c:\users\seewo\appdata\local\programs\python\python310\lib\site-packages\bilibili_api\*
    c:\users\seewo\appdata\local\programs\python\python310\lib\site-packages\bilibili_api_python-13.1.2.dist-info\*
    c:\users\seewo\appdata\local\programs\python\python310\scripts\bilibili-api.exe
Proceed (Y/n)? pip install bilibili-api-pythony
Your response ('pip install bilibili-api-pythony') was not one of the expected responses: y, n,
Proceed (Y/n)? y
  Successfully uninstalled bilibili-api-python-13.1.2

C:\Users\seewo>pip uninstall bilibili-api
WARNING: Skipping bilibili-api as it is not installed.

C:\Users\seewo>pip uninstall bilibili-api-python
WARNING: Skipping bilibili-api-python as it is not installed.

C:\Users\seewo>pip install bilibili-api-python
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting bilibili-api-python
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/30/7b/0b54158b814a6f933e9d20ac2f1486d73b48b6962544c3f5a1eb5af022da/bilibili_api_python-13.2.0-py3-none-any.whl (193 kB)
     ---------------------------------------- 193.5/193.5 kB 902.7 kB/s eta 0:00:00
Requirement already satisfied: APScheduler~=3.9.1 in c:\users\seewo\appdata\local\programs\python\python310\lib\site-packages (from bilibili-api-python) (3.9.1)
Requirement already satisfied: beautifulsoup4~=4.11.1 in c:\users\seewo\appdata\local\programs\python\python310\lib\site-packages (from bilibili-api-python) (4.11.1)
Requirement already satisfied: urllib3~=1.26.12 in c:\users\seewo\appdata\local\programs\python\python310\lib\site-packages (from bilibili-api-python) (1.26.12)
Requirement already satisfied: brotli~=1.0.9 in c:\users\seewo\appdata\local\programs\python\python310\lib\site-packages (from bilibili-api-python) (1.0.9)
Requirement already satisfied: httpx~=0.23.0 in c:\users\seewo\appdata\local\programs\python\python310\lib\site-packages (from bilibili-api-python) (0.23.0)
Requirement already satisfied: requests~=2.28.1 in c:\users\seewo\appdata\local\programs\python\python310\lib\site-packages (from bilibili-api-python) (2.28.1)
Requirement already satisfied: pillow~=9.2.0 in c:\users\seewo\appdata\local\programs\python\python310\lib\site-packages (from bilibili-api-python) (9.2.0)
Requirement already satisfied: keyboard~=0.13.5 in c:\users\seewo\appdata\local\programs\python\python310\lib\site-packages (from bilibili-api-python) (0.13.5)
Requirement already satisfied: rsa~=4.9 in c:\users\seewo\appdata\local\programs\python\python310\lib\site-packages (from bilibili-api-python) (4.9)
Requirement already satisfied: qrcode~=7.3.1 in c:\users\seewo\appdata\local\programs\python\python310\lib\site-packages (from bilibili-api-python) (7.3.1)
Requirement already satisfied: pyyaml~=6.0 in c:\users\seewo\appdata\local\programs\python\python310\lib\site-packages (from bilibili-api-python) (6.0)
Requirement already satisfied: colorama~=0.4.6 in c:\users\seewo\appdata\local\programs\python\python310\lib\site-packages (from bilibili-api-python) (0.4.6)
Requirement already satisfied: aiohttp~=3.8.3 in c:\users\seewo\appdata\local\programs\python\python310\lib\site-packages (from bilibili-api-python) (3.8.3)
Requirement already satisfied: lxml~=4.9.0 in c:\users\seewo\appdata\local\programs\python\python310\lib\site-packages (from bilibili-api-python) (4.9.1)
Requirement already satisfied: async-timeout<5.0,>=4.0.0a3 in c:\users\seewo\appdata\local\programs\python\python310\lib\site-packages (from aiohttp~=3.8.3->bilibili-api-python) (4.0.2)
Requirement already satisfied: charset-normalizer<3.0,>=2.0 in c:\users\seewo\appdata\local\programs\python\python310\lib\site-packages (from aiohttp~=3.8.3->bilibili-api-python) (2.1.1)
Requirement already satisfied: aiosignal>=1.1.2 in c:\users\seewo\appdata\local\programs\python\python310\lib\site-packages (from aiohttp~=3.8.3->bilibili-api-python) (1.2.0)
Requirement already satisfied: frozenlist>=1.1.1 in c:\users\seewo\appdata\local\programs\python\python310\lib\site-packages (from aiohttp~=3.8.3->bilibili-api-python) (1.3.1)
Requirement already satisfied: yarl<2.0,>=1.0 in c:\users\seewo\appdata\local\programs\python\python310\lib\site-packages (from aiohttp~=3.8.3->bilibili-api-python) (1.8.1)
Requirement already satisfied: multidict<7.0,>=4.5 in c:\users\seewo\appdata\local\programs\python\python310\lib\site-packages (from aiohttp~=3.8.3->bilibili-api-python) (6.0.2)
Requirement already satisfied: attrs>=17.3.0 in c:\users\seewo\appdata\local\programs\python\python310\lib\site-packages (from aiohttp~=3.8.3->bilibili-api-python) (22.1.0)
Requirement already satisfied: setuptools>=0.7 in c:\users\seewo\appdata\local\programs\python\python310\lib\site-packages (from APScheduler~=3.9.1->bilibili-api-python) (63.2.0)
Requirement already satisfied: tzlocal!=3.*,>=2.0 in c:\users\seewo\appdata\local\programs\python\python310\lib\site-packages (from APScheduler~=3.9.1->bilibili-api-python) (4.2)
Requirement already satisfied: six>=1.4.0 in c:\users\seewo\appdata\local\programs\python\python310\lib\site-packages (from APScheduler~=3.9.1->bilibili-api-python) (1.16.0)
Requirement already satisfied: pytz in c:\users\seewo\appdata\local\programs\python\python310\lib\site-packages (from APScheduler~=3.9.1->bilibili-api-python) (2022.6)
Requirement already satisfied: soupsieve>1.2 in c:\users\seewo\appdata\local\programs\python\python310\lib\site-packages (from beautifulsoup4~=4.11.1->bilibili-api-python) (2.3.2.post1)
Requirement already satisfied: certifi in c:\users\seewo\appdata\local\programs\python\python310\lib\site-packages (from httpx~=0.23.0->bilibili-api-python) (2022.9.24)
Requirement already satisfied: httpcore<0.16.0,>=0.15.0 in c:\users\seewo\appdata\local\programs\python\python310\lib\site-packages (from httpx~=0.23.0->bilibili-api-python) (0.15.0)
Requirement already satisfied: rfc3986[idna2008]<2,>=1.3 in c:\users\seewo\appdata\local\programs\python\python310\lib\site-packages (from httpx~=0.23.0->bilibili-api-python) (1.5.0)
Requirement already satisfied: sniffio in c:\users\seewo\appdata\local\programs\python\python310\lib\site-packages (from httpx~=0.23.0->bilibili-api-python) (1.3.0)
Requirement already satisfied: idna<4,>=2.5 in c:\users\seewo\appdata\local\programs\python\python310\lib\site-packages (from requests~=2.28.1->bilibili-api-python) (3.4)
Requirement already satisfied: pyasn1>=0.1.3 in c:\users\seewo\appdata\local\programs\python\python310\lib\site-packages (from rsa~=4.9->bilibili-api-python) (0.4.8)
Requirement already satisfied: h11<0.13,>=0.11 in c:\users\seewo\appdata\local\programs\python\python310\lib\site-packages (from httpcore<0.16.0,>=0.15.0->httpx~=0.23.0->bilibili-api-python) (0.12.0)
Requirement already satisfied: anyio==3.* in c:\users\seewo\appdata\local\programs\python\python310\lib\site-packages (from httpcore<0.16.0,>=0.15.0->httpx~=0.23.0->bilibili-api-python) (3.6.2)
Requirement already satisfied: pytz-deprecation-shim in c:\users\seewo\appdata\local\programs\python\python310\lib\site-packages (from tzlocal!=3.*,>=2.0->APScheduler~=3.9.1->bilibili-api-python) (0.1.0.post0)
Requirement already satisfied: tzdata in c:\users\seewo\appdata\local\programs\python\python310\lib\site-packages (from tzlocal!=3.*,>=2.0->APScheduler~=3.9.1->bilibili-api-python) (2022.6)
Installing collected packages: bilibili-api-python
Successfully installed bilibili-api-python-13.2.0

[notice] A new release of pip available: 22.3 -> 22.3.1
[notice] To update, run: python.exe -m pip install --upgrade pip

C:\Users\seewo>python -c "import bilibili_api"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\seewo\AppData\Local\Programs\Python\Python310\lib\site-packages\bilibili_api\__init__.py", line 9, in <module>
    from . import (
  File "C:\Users\seewo\AppData\Local\Programs\Python\Python310\lib\site-packages\bilibili_api\live.py", line 15, in <module>
    import brotli
  File "C:\Users\seewo\AppData\Local\Programs\Python\Python310\lib\site-packages\brotli.py", line 8, in <module>
    import _brotli
ImportError: DLL load failed while importing _brotli: 找不到指定的模块。

C:\Users\seewo>
Nemo2011 commented 2 years ago

brotli 也重新安装一下