Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: 安装报错ERROR: Could not build wheels for multidict, which is required to install pyproject.toml-based projects #666

Closed
bobandbrony opened this issue Jan 17, 2024 · 5 comments
Labels
bug? Bug或Bug修复相关

Comments

@bobandbrony
Copy link

部署方式

手动部署

登录框架

go-cqhttp

系统环境

Windows10 ltsc 中国四川

Python环境

python 3.12.1

QChatGPT版本

v2.6.9

异常情况

使用pip3 install -r requirements.txt安装依赖时

日志信息

Building wheels for collected packages: multidict
Building wheel for multidict (pyproject.toml) ... error
error: subprocess-exited-with-error

× Building wheel for multidict (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [74 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\multidict
copying multidict_abc.py -> build\lib.win-amd64-cpython-312\multidict
copying multidict_compat.py -> build\lib.win-amd64-cpython-312\multidict
copying multidict_multidict_base.py -> build\lib.win-amd64-cpython-312\multidict
copying multidict_multidict_py.py -> build\lib.win-amd64-cpython-312\multidict
copying multidict_init_.py -> build\lib.win-amd64-cpython-312\multidict
running egg_info
writing multidict.egg-info\PKG-INFO
writing dependency_links to multidict.egg-info\dependency_links.txt
writing top-level names to multidict.egg-info\top_level.txt
reading manifest file 'multidict.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files found matching 'multidict_multidict.html'
warning: no previously-included files found matching 'multidict*.so'
warning: no previously-included files found matching 'multidict*.pyd'
warning: no previously-included files found matching 'multidict*.pyd'
no previously-included directories found matching 'docs_build'
adding license file 'LICENSE'
writing manifest file 'multidict.egg-info\SOURCES.txt'
C:\Users\Admin\AppData\Local\Temp\pip-build-env-ofurg2jg\overlay\Lib\site-packages\setuptools\command\build_py.py:207: _Warning: Package 'multidict._multilib' is absent from the packages configuration.
!!

          ********************************************************************************
          ############################
          # Package would be ignored #
          ############################
          Python recognizes 'multidict._multilib' as an importable package[^1],
          but it is absent from setuptools' `packages` configuration.

          This leads to an ambiguous overall configuration. If you want to distribute this
          package, please make sure that 'multidict._multilib' is explicitly added
          to the `packages` configuration field.

          Alternatively, you can also rely on setuptools' discovery methods
          (for example by using `find_namespace_packages(...)`/`find_namespace:`
          instead of `find_packages(...)`/`find:`).

          You can read more about "package discovery" on setuptools documentation page:

          - https://setuptools.pypa.io/en/latest/userguide/package_discovery.html

          If you don't want 'multidict._multilib' to be distributed and are
          already explicitly excluding 'multidict._multilib' via
          `find_namespace_packages(...)/find_namespace` or `find_packages(...)/find`,
          you can try to use `exclude_package_data`, or `include-package-data=False` in
          combination with a more fine grained `package-data` configuration.

          You can read more about "package data files" on setuptools documentation page:

          - https://setuptools.pypa.io/en/latest/userguide/datafiles.html


          [^1]: For Python, any directory (with suitable naming) can be imported,
                even if it does not contain any `.py` files.
                On the other hand, currently there is no concept of package data
                directory, all directories are treated like packages.
          ********************************************************************************

  !!
    check.warn(importable)
  copying multidict\__init__.pyi -> build\lib.win-amd64-cpython-312\multidict
  copying multidict\py.typed -> build\lib.win-amd64-cpython-312\multidict
  running build_ext
  building 'multidict._multidict' extension
  error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
  [end of output]

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

启用的插件

@bobandbrony bobandbrony added the bug? Bug或Bug修复相关 label Jan 17, 2024
@RockChinQ
Copy link
Owner

3.12 我还没测过,估计不能用。换 Python 3.11 试一下呢?

https://www.python.org/downloads/release/python-3117/

@bobandbrony
Copy link
Author

3.12 我还没测过,估计不能用。换 Python 3.11 试一下呢?

https://www.python.org/downloads/release/python-3117/

呃,可能是这个版本的问题,由于其他项目需要,我降回了3.9.11
这会报错
PS D:\chatbot-\QChatGPT-2.6.9> py main.py
Traceback (most recent call last):
File "D:\chatbot-\QChatGPT-2.6.9\main.py", line 57, in
from pkg.utils.log import init_runtime_log_file, reset_logging
File "D:\chatbot-\QChatGPT-2.6.9\pkg\utils\log.py", line 6, in
from . import context
File "D:\chatbot-\QChatGPT-2.6.9\pkg\utils\context.py", line 7, in
from ..openai import manager as openai_mgr
File "D:\chatbot-\QChatGPT-2.6.9\pkg\openai\manager.py", line 4, in
from openai.types import images_response
ModuleNotFoundError: No module named 'openai.types'

@RockChinQ
Copy link
Owner

现在你更新一下 openai 库到最新版本就可以了
pip install -U openai

@bobandbrony
Copy link
Author

现在你更新一下 openai 库到最新版本就可以了 pip install -U openai
已解决,谢谢!
教程提供的qsign地址没法用

@RockChinQ
Copy link
Owner

multidict暂不支持 3.12,跟踪issue:aio-libs/multidict#887

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug? Bug或Bug修复相关
Projects
None yet
Development

No branches or pull requests

2 participants