PeterDing/BaiduPCS-Py

subprocess-exited-with-error 安装baidupc-py失败

ldj46118 opened this issue · 1 comments

WARNNING: Please to search the similar bugs, before you report a bug. Don't report a similar bug which existed.
注意:在你提交一份报告前,请先搜索是否存在类似的报告。请勿重复提交内容相同的报告。

Prerequisites / 报告前提
Before you report a bug, please let the bug to be reproduced at the latest verion of BaiduPCS-Py.
在你提交报告前,请在 BaiduPCS-Py 的最新版本上复现问题。

At sometimes, there are errors occured by an expired cookie. Before you commit the report, please to check whether cookies are expired.
有时一些错误是由于某个 cookie 超期导致的。在你提交报告前,请先检查你的 cookies 是否超期。

Describe the bug / 描述 bug
A clear and concise description of what the bug is.
请清楚的描述你遇到的问题。

To Reproduce / 复现问题
Steps to reproduce the behavior:

  1. Do '...'
  2. Do '....'
  3. ...
  4. See error

按照下面的步骤可以复现问题:

  1. 做 '...'
  2. 做 '...'
  3. ...
  4. 问题出现

Screenshots / 问题截图
If applicable, add screenshots to help explain your problem.

Don't show BDUSS and cookies.

如果可能,请附加问题截图。

不要出现 BDUSScookies

Envrionment / 运行环境

  • OS: [e.g. Windows]
  • Python [e.g. Python3.10.11]
  • BaiduPCS-Py Version [e.g. 0.6.9]
    C:\Users\Administrator>pip3 install BaiduPCS-Py
    Collecting BaiduPCS-Py
    Using cached baidupcs_py-0.7.4.tar.gz (113 kB)
    Installing build dependencies ... done
    Getting requirements to build wheel ... done
    Preparing metadata (pyproject.toml) ... done
    Collecting aget<0.2.0,>=0.1.17 (from BaiduPCS-Py)
    Using cached aget-0.1.17-py3-none-any.whl
    Collecting chardet<6.0.0,>=5.0.0 (from BaiduPCS-Py)
    Using cached chardet-5.2.0-py3-none-any.whl.metadata (3.4 kB)
    Collecting click<9.0.0,>=8.1.3 (from BaiduPCS-Py)
    Using cached click-8.1.7-py3-none-any.whl.metadata (3.0 kB)
    Collecting cryptography<39.0.0,>=38.0.3 (from BaiduPCS-Py)
    Using cached cryptography-38.0.4-cp36-abi3-win_amd64.whl.metadata (5.4 kB)
    Collecting cython<0.30.0,>=0.29.32 (from BaiduPCS-Py)
    Using cached Cython-0.29.37-py2.py3-none-any.whl.metadata (3.1 kB)
    Collecting fastapi<0.88.0,>=0.87.0 (from BaiduPCS-Py)
    Using cached fastapi-0.87.0-py3-none-any.whl.metadata (24 kB)
    Collecting jinja2<4.0.0,>=3.1.2 (from BaiduPCS-Py)
    Using cached Jinja2-3.1.3-py3-none-any.whl.metadata (3.3 kB)
    Collecting passlib<2.0.0,>=1.7.4 (from BaiduPCS-Py)
    Using cached passlib-1.7.4-py2.py3-none-any.whl.metadata (1.7 kB)
    Collecting pillow<10.0.0,>=9.3.0 (from BaiduPCS-Py)
    Using cached Pillow-9.5.0-cp311-cp311-win_amd64.whl.metadata (9.7 kB)
    Collecting requests<3.0.0,>=2.28.1 (from BaiduPCS-Py)
    Using cached requests-2.31.0-py3-none-any.whl.metadata (4.6 kB)
    Collecting requests-toolbelt<0.11.0,>=0.10.1 (from BaiduPCS-Py)
    Using cached requests_toolbelt-0.10.1-py2.py3-none-any.whl.metadata (14 kB)
    Collecting rich<13.0.0,>=12.6.0 (from BaiduPCS-Py)
    Using cached rich-12.6.0-py3-none-any.whl.metadata (18 kB)
    Collecting typing-extensions<5.0.0,>=4.4.0 (from BaiduPCS-Py)
    Using cached typing_extensions-4.11.0-py3-none-any.whl.metadata (3.0 kB)
    Collecting uvicorn<0.20.0,>=0.19.0 (from BaiduPCS-Py)
    Using cached uvicorn-0.19.0-py3-none-any.whl.metadata (6.2 kB)
    Collecting mugen (from aget<0.2.0,>=0.1.17->BaiduPCS-Py)
    Using cached mugen-0.6.1-py3-none-any.whl
    Collecting colorama (from click<9.0.0,>=8.1.3->BaiduPCS-Py)
    Using cached colorama-0.4.6-py2.py3-none-any.whl.metadata (17 kB)
    Collecting cffi>=1.12 (from cryptography<39.0.0,>=38.0.3->BaiduPCS-Py)
    Using cached cffi-1.16.0-cp311-cp311-win_amd64.whl.metadata (1.5 kB)
    Collecting pydantic!=1.7,!=1.7.1,!=1.7.2,!=1.7.3,!=1.8,!=1.8.1,<2.0.0,>=1.6.2 (from fastapi<0.88.0,>=0.87.0->BaiduPCS-Py)
    Using cached pydantic-1.10.15-cp311-cp311-win_amd64.whl.metadata (152 kB)
    Collecting starlette==0.21.0 (from fastapi<0.88.0,>=0.87.0->BaiduPCS-Py)
    Using cached starlette-0.21.0-py3-none-any.whl.metadata (5.6 kB)
    Collecting anyio<5,>=3.4.0 (from starlette==0.21.0->fastapi<0.88.0,>=0.87.0->BaiduPCS-Py)
    Using cached anyio-4.3.0-py3-none-any.whl.metadata (4.6 kB)
    Collecting MarkupSafe>=2.0 (from jinja2<4.0.0,>=3.1.2->BaiduPCS-Py)
    Using cached MarkupSafe-2.1.5-cp311-cp311-win_amd64.whl.metadata (3.1 kB)
    Collecting charset-normalizer<4,>=2 (from requests<3.0.0,>=2.28.1->BaiduPCS-Py)
    Using cached charset_normalizer-3.3.2-cp311-cp311-win_amd64.whl.metadata (34 kB)
    Collecting idna<4,>=2.5 (from requests<3.0.0,>=2.28.1->BaiduPCS-Py)
    Using cached idna-3.6-py3-none-any.whl.metadata (9.9 kB)
    Collecting urllib3<3,>=1.21.1 (from requests<3.0.0,>=2.28.1->BaiduPCS-Py)
    Using cached urllib3-2.2.1-py3-none-any.whl.metadata (6.4 kB)
    Collecting certifi>=2017.4.17 (from requests<3.0.0,>=2.28.1->BaiduPCS-Py)
    Using cached certifi-2024.2.2-py3-none-any.whl.metadata (2.2 kB)
    Collecting commonmark<0.10.0,>=0.9.0 (from rich<13.0.0,>=12.6.0->BaiduPCS-Py)
    Using cached commonmark-0.9.1-py2.py3-none-any.whl.metadata (5.7 kB)
    Collecting pygments<3.0.0,>=2.6.0 (from rich<13.0.0,>=12.6.0->BaiduPCS-Py)
    Using cached pygments-2.17.2-py3-none-any.whl.metadata (2.6 kB)
    Collecting h11>=0.8 (from uvicorn<0.20.0,>=0.19.0->BaiduPCS-Py)
    Using cached h11-0.14.0-py3-none-any.whl.metadata (8.2 kB)
    Collecting pycparser (from cffi>=1.12->cryptography<39.0.0,>=38.0.3->BaiduPCS-Py)
    Using cached pycparser-2.22-py3-none-any.whl.metadata (943 bytes)
    Collecting httptools<0.7.0,>=0.6.1 (from mugen->aget<0.2.0,>=0.1.17->BaiduPCS-Py)
    Using cached httptools-0.6.1-cp311-cp311-win_amd64.whl.metadata (3.7 kB)
    Collecting sniffio>=1.1 (from anyio<5,>=3.4.0->starlette==0.21.0->fastapi<0.88.0,>=0.87.0->BaiduPCS-Py)
    Using cached sniffio-1.3.1-py3-none-any.whl.metadata (3.9 kB)
    Using cached chardet-5.2.0-py3-none-any.whl (199 kB)
    Using cached click-8.1.7-py3-none-any.whl (97 kB)
    Using cached cryptography-38.0.4-cp36-abi3-win_amd64.whl (2.4 MB)
    Using cached Cython-0.29.37-py2.py3-none-any.whl (989 kB)
    Using cached fastapi-0.87.0-py3-none-any.whl (55 kB)
    Using cached starlette-0.21.0-py3-none-any.whl (64 kB)
    Using cached Jinja2-3.1.3-py3-none-any.whl (133 kB)
    Using cached passlib-1.7.4-py2.py3-none-any.whl (525 kB)
    Using cached Pillow-9.5.0-cp311-cp311-win_amd64.whl (2.5 MB)
    Using cached requests-2.31.0-py3-none-any.whl (62 kB)
    Using cached requests_toolbelt-0.10.1-py2.py3-none-any.whl (54 kB)
    Using cached rich-12.6.0-py3-none-any.whl (237 kB)
    Using cached typing_extensions-4.11.0-py3-none-any.whl (34 kB)
    Using cached uvicorn-0.19.0-py3-none-any.whl (56 kB)
    Using cached certifi-2024.2.2-py3-none-any.whl (163 kB)
    Using cached cffi-1.16.0-cp311-cp311-win_amd64.whl (181 kB)
    Using cached charset_normalizer-3.3.2-cp311-cp311-win_amd64.whl (99 kB)
    Using cached commonmark-0.9.1-py2.py3-none-any.whl (51 kB)
    Using cached h11-0.14.0-py3-none-any.whl (58 kB)
    Using cached idna-3.6-py3-none-any.whl (61 kB)
    Using cached MarkupSafe-2.1.5-cp311-cp311-win_amd64.whl (17 kB)
    Using cached pydantic-1.10.15-cp311-cp311-win_amd64.whl (2.1 MB)
    Using cached pygments-2.17.2-py3-none-any.whl (1.2 MB)
    Using cached urllib3-2.2.1-py3-none-any.whl (121 kB)
    Using cached colorama-0.4.6-py2.py3-none-any.whl (25 kB)
    Using cached anyio-4.3.0-py3-none-any.whl (85 kB)
    Using cached httptools-0.6.1-cp311-cp311-win_amd64.whl (55 kB)
    Using cached pycparser-2.22-py3-none-any.whl (117 kB)
    Using cached sniffio-1.3.1-py3-none-any.whl (10 kB)
    Building wheels for collected packages: BaiduPCS-Py
    Building wheel for BaiduPCS-Py (pyproject.toml) ... error
    error: subprocess-exited-with-error

× Building wheel for BaiduPCS-Py (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [31 lines of output]
Compiling baidupcs_py/common/simple_cipher.pyx because it changed.
[1/1] Cythonizing baidupcs_py/common/simple_cipher.pyx
usage: build.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: build.py --help [cmd1 cmd2 ...]
or: build.py --help-commands
or: build.py cmd --help

  error: no commands supplied
  Traceback (most recent call last):
    File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
      main()
    File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 251, in build_wheel
      return _build_backend().build_wheel(wheel_directory, config_settings,
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\Administrator\AppData\Local\Temp\pip-build-env-_1kmcjni\overlay\Lib\site-packages\poetry\core\masonry\api.py", line 58, in build_wheel
      return WheelBuilder.make_in(
             ^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\Administrator\AppData\Local\Temp\pip-build-env-_1kmcjni\overlay\Lib\site-packages\poetry\core\masonry\builders\wheel.py", line 88, in make_in
      wb.build(target_dir=directory)
    File "C:\Users\Administrator\AppData\Local\Temp\pip-build-env-_1kmcjni\overlay\Lib\site-packages\poetry\core\masonry\builders\wheel.py", line 123, in build
      self._build(zip_file)
    File "C:\Users\Administrator\AppData\Local\Temp\pip-build-env-_1kmcjni\overlay\Lib\site-packages\poetry\core\masonry\builders\wheel.py", line 172, in _build
      self._run_build_script(self._package.build_script)
    File "C:\Users\Administrator\AppData\Local\Temp\pip-build-env-_1kmcjni\overlay\Lib\site-packages\poetry\core\masonry\builders\wheel.py", line 262, in _run_build_script
      subprocess.check_call([self.executable.as_posix(), build_script])
    File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\subprocess.py", line 413, in check_call
      raise CalledProcessError(retcode, cmd)
  subprocess.CalledProcessError: Command '['C:/Users/Administrator/AppData/Local/Programs/Python/Python311/python.exe', 'build.py']' returned non-zero exit status 1.
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for BaiduPCS-Py
Failed to build BaiduPCS-Py
ERROR: Could not build wheels for BaiduPCS-Py, which is required to install pyproject.toml-based projects

安装baidupc-py失败

Additional context / 补充内容
Add any other context about the problem here.
在这里增加补充内容。

从出错信息上看,你用的是Python3.11,目前在3.11上还有一点问题。请用3.10或3.10以下版本.