RockChinQ / QChatGPT

😎高稳定性、🧩支持扩展、🦄多模态的 ChatGPT QQ / QQ频道 / One Bot 机器人🤖 | 支持 OpenAI GPT、GPT 4o、Claude、Gemini Pro、DeepSeek、Moonshot(Kimi)、gpt4free、One API、Ollama 的 QQ / QQ频道 / OneBot 机器人 / Agent 平台
https://q.rkcn.top
GNU Affero General Public License v3.0
4.14k stars 326 forks source link

[Bug]: 安装依赖时报错 #621

Closed shecong closed 8 months ago

shecong commented 8 months ago

部署方式

手动部署

登录框架

Mirai

系统环境

windowsserver

Python环境

python13

异常情况

使用自动部署,手动安装pip install -r requirements.txt执行之后报错

报错信息

C:\sc\qqchatgpt\css\QChatGPT>pip install -r requirements.txt Collecting requests (from -r requirements.txt (line 1)) Using cached requests-2.31.0-py3-none-any.whl.metadata (4.6 kB) Requirement already satisfied: openai in c:\users\administrator\appdata\local\programs\python\python312\lib\site-packages (from -r requirements.txt (line 2)) (1.3.6) Collecting dulwich~=0.21.6 (from -r requirements.txt (line 3)) Using cached dulwich-0.21.6-cp312-cp312-win_amd64.whl Collecting colorlog~=6.6.0 (from -r requirements.txt (line 4)) Using cached colorlog-6.6.0-py2.py3-none-any.whl (11 kB) Collecting yiri-mirai-rc (from -r requirements.txt (line 5)) Using cached yiri_mirai_rc-0.2.7.3-py3-none-any.whl.metadata (3.4 kB) Collecting websockets (from -r requirements.txt (line 6)) Using cached websockets-12.0-cp312-cp312-win_amd64.whl.metadata (6.8 kB) Collecting urllib3 (from -r requirements.txt (line 7)) Using cached urllib3-2.1.0-py3-none-any.whl.metadata (6.4 kB) Collecting func_timeout~=4.3.5 (from -r requirements.txt (line 8)) Using cached func_timeout-4.3.5-py3-none-any.whl Collecting Pillow (from -r requirements.txt (line 9)) Using cached Pillow-10.1.0-cp312-cp312-win_amd64.whl.metadata (9.6 kB) Collecting nakuru-project-idk (from -r requirements.txt (line 10)) Using cached nakuru_project_idk-0.0.2.1-py3-none-any.whl (24 kB) Requirement already satisfied: CallingGPT in c:\users\administrator\appdata\local\programs\python\python312\lib\site-packages (from -r requirements.txt (line 11)) (0.0.1.0) Collecting tiktoken (from -r requirements.txt (line 12)) Using cached tiktoken-0.5.1.tar.gz (32 kB) Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... done Collecting PyYaml (from -r requirements.txt (line 13)) Using cached PyYAML-6.0.1-cp312-cp312-win_amd64.whl.metadata (2.1 kB) Collecting charset-normalizer<4,>=2 (from requests->-r requirements.txt (line 1)) Using cached charset_normalizer-3.3.2-cp312-cp312-win_amd64.whl.metadata (34 kB) Requirement already satisfied: idna<4,>=2.5 in c:\users\administrator\appdata\local\programs\python\python312\lib\site-packages (from requests->-r requirements.txt (line 1)) (3.6) Requirement already satisfied: certifi>=2017.4.17 in c:\users\administrator\appdata\local\programs\python\python312\lib\site-packages (from requests->-r requirements.txt (line 1)) (2023.11.17) Requirement already satisfied: anyio<4,>=3.5.0 in c:\users\administrator\appdata\local\programs\python\python312\lib\site-packages (from openai->-r requirements.txt (line 2)) (3.7.1) Requirement already satisfied: distro<2,>=1.7.0 in c:\users\administrator\appdata\local\programs\python\python312\lib\site-packages (from openai->-r requirements.txt (line 2)) (1.8.0) Requirement already satisfied: httpx<1,>=0.23.0 in c:\users\administrator\appdata\local\programs\python\python312\lib\site-packages (from openai->-r requirements.txt (line 2)) (0.25.2) Requirement already satisfied: pydantic<3,>=1.9.0 in c:\users\administrator\appdata\local\programs\python\python312\lib\site-packages (from openai->-r requirements.txt (line 2)) (2.5.2) Requirement already satisfied: sniffio in c:\users\administrator\appdata\local\programs\python\python312\lib\site-packages (from openai->-r requirements.txt (line 2)) (1.3.0) Requirement already satisfied: tqdm>4 in c:\users\administrator\appdata\local\programs\python\python312\lib\site-packages (from openai->-r requirements.txt (line 2)) (4.66.1) Requirement already satisfied: typing-extensions<5,>=4.5 in c:\users\administrator\appdata\local\programs\python\python312\lib\site-packages (from openai->-r requirements.txt (line 2)) (4.8.0) Requirement already satisfied: colorama in c:\users\administrator\appdata\local\programs\python\python312\lib\site-packages (from colorlog~=6.6.0->-r requirements.txt (line 4)) (0.4.6) Collecting aiofiles<24.0.0,>=23.2.1 (from yiri-mirai-rc->-r requirements.txt (line 5)) Using cached aiofiles-23.2.1-py3-none-any.whl.metadata (9.7 kB) Collecting pydantic<3,>=1.9.0 (from openai->-r requirements.txt (line 2)) Using cached pydantic-1.10.13-py3-none-any.whl.metadata (149 kB) Collecting starlette<1.0,>=0.14.2 (from yiri-mirai-rc->-r requirements.txt (line 5)) Using cached starlette-0.32.0.post1-py3-none-any.whl.metadata (5.8 kB) Collecting aiohttp (from nakuru-project-idk->-r requirements.txt (line 10)) Using cached aiohttp-3.9.1-cp312-cp312-win_amd64.whl.metadata (7.6 kB) Collecting async-lru (from nakuru-project-idk->-r requirements.txt (line 10)) Using cached async_lru-2.0.4-py3-none-any.whl.metadata (4.5 kB) Collecting logbook (from nakuru-project-idk->-r requirements.txt (line 10)) Using cached Logbook-1.7.0.post0-cp312-cp312-win_amd64.whl.metadata (2.6 kB) Collecting regex>=2022.1.18 (from tiktoken->-r requirements.txt (line 12)) Using cached regex-2023.10.3-cp312-cp312-win_amd64.whl.metadata (41 kB) Requirement already satisfied: httpcore==1. in c:\users\administrator\appdata\local\programs\python\python312\lib\site-packages (from httpx<1,>=0.23.0->openai->-r requirements.txt (line 2)) (1.0.2) Requirement already satisfied: h11<0.15,>=0.13 in c:\users\administrator\appdata\local\programs\python\python312\lib\site-packages (from httpcore==1.->httpx<1,>=0.23.0->openai->-r requirements.txt (line 2)) (0.14.0) Collecting attrs>=17.3.0 (from aiohttp->nakuru-project-idk->-r requirements.txt (line 10)) Using cached attrs-23.1.0-py3-none-any.whl (61 kB) Collecting multidict<7.0,>=4.5 (from aiohttp->nakuru-project-idk->-r requirements.txt (line 10)) Using cached multidict-6.0.4.tar.gz (51 kB) Installing build dependencies ... done Getting requirements to build wheel ... done Installing backend dependencies ... done Preparing metadata (pyproject.toml) ... done Collecting yarl<2.0,>=1.0 (from aiohttp->nakuru-project-idk->-r requirements.txt (line 10)) Using cached yarl-1.9.3-cp312-cp312-win_amd64.whl.metadata (29 kB) Collecting frozenlist>=1.1.1 (from aiohttp->nakuru-project-idk->-r requirements.txt (line 10)) Using cached frozenlist-1.4.0.tar.gz (90 kB) Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... done Collecting aiosignal>=1.1.2 (from aiohttp->nakuru-project-idk->-r requirements.txt (line 10)) Using cached aiosignal-1.3.1-py3-none-any.whl (7.6 kB) Using cached requests-2.31.0-py3-none-any.whl (62 kB) Using cached yiri_mirai_rc-0.2.7.3-py3-none-any.whl (77 kB) Using cached websockets-12.0-cp312-cp312-win_amd64.whl (124 kB) Using cached urllib3-2.1.0-py3-none-any.whl (104 kB) Using cached Pillow-10.1.0-cp312-cp312-win_amd64.whl (2.6 MB) Using cached PyYAML-6.0.1-cp312-cp312-win_amd64.whl (138 kB) Using cached aiofiles-23.2.1-py3-none-any.whl (15 kB) Using cached charset_normalizer-3.3.2-cp312-cp312-win_amd64.whl (100 kB) Using cached pydantic-1.10.13-py3-none-any.whl (158 kB) Using cached regex-2023.10.3-cp312-cp312-win_amd64.whl (268 kB) Using cached starlette-0.32.0.post1-py3-none-any.whl (70 kB) Using cached aiohttp-3.9.1-cp312-cp312-win_amd64.whl (362 kB) Using cached async_lru-2.0.4-py3-none-any.whl (6.1 kB) Using cached Logbook-1.7.0.post0-cp312-cp312-win_amd64.whl (122 kB) Using cached yarl-1.9.3-cp312-cp312-win_amd64.whl (75 kB) Building wheels for collected packages: tiktoken, frozenlist, multidict Building wheel for tiktoken (pyproject.toml) ... error error: subprocess-exited-with-error

× Building wheel for tiktoken (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [38 lines of output] running bdist_wheel running build running build_py creating build creating build\lib.win-amd64-cpython-312 creating build\lib.win-amd64-cpython-312\tiktoken copying tiktoken\core.py -> build\lib.win-amd64-cpython-312\tiktoken copying tiktoken\load.py -> build\lib.win-amd64-cpython-312\tiktoken copying tiktoken\model.py -> build\lib.win-amd64-cpython-312\tiktoken copying tiktoken\registry.py -> build\lib.win-amd64-cpython-312\tiktoken copying tiktoken_educational.py -> build\lib.win-amd64-cpython-312\tiktoken copying tiktoken__init__.py -> build\lib.win-amd64-cpython-312\tiktoken creating build\lib.win-amd64-cpython-312\tiktoken_ext copying tiktoken_ext\openai_public.py -> build\lib.win-amd64-cpython-312\tiktoken_ext running egg_info writing tiktoken.egg-info\PKG-INFO writing dependency_links to tiktoken.egg-info\dependency_links.txt writing requirements to tiktoken.egg-info\requires.txt writing top-level names to tiktoken.egg-info\top_level.txt reading manifest file 'tiktoken.egg-info\SOURCES.txt' reading manifest template 'MANIFEST.in' warning: no files found matching 'Makefile' adding license file 'LICENSE' writing manifest file 'tiktoken.egg-info\SOURCES.txt' copying tiktoken\py.typed -> build\lib.win-amd64-cpython-312\tiktoken running build_ext running build_rust error: can't find Rust compiler

  If you are using an outdated pip version, it is possible a prebuilt wheel is available for this package but pip is not able to install from it. Installing from the wheel would avoid the need for a Rust compiler.

  To update pip, run:

      pip install --upgrade pip

  and then retry package installation.

  If you did intend to build this package from source, try installing a Rust compiler from your system package manager and ensure it is on the PATH during installation. Alternatively, rustup (available at https://rustup.rs) is the recommended way to download and update the Rust compiler toolchain.
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for tiktoken Building wheel for frozenlist (pyproject.toml) ... error error: subprocess-exited-with-error

× Building wheel for frozenlist (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [33 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\frozenlist
  copying frozenlist\__init__.py -> build\lib.win-amd64-cpython-312\frozenlist
  running egg_info
  writing frozenlist.egg-info\PKG-INFO
  writing dependency_links to frozenlist.egg-info\dependency_links.txt
  writing top-level names to frozenlist.egg-info\top_level.txt
  reading manifest file 'frozenlist.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 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 'frozenlist\*.html'
  no previously-included directories found matching 'docs\_build'
  adding license file 'LICENSE'
  writing manifest file 'frozenlist.egg-info\SOURCES.txt'
  copying frozenlist\__init__.pyi -> build\lib.win-amd64-cpython-312\frozenlist
  copying frozenlist\_frozenlist.pyx -> build\lib.win-amd64-cpython-312\frozenlist
  copying frozenlist\py.typed -> build\lib.win-amd64-cpython-312\frozenlist
  running build_ext
  building 'frozenlist._frozenlist' 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 frozenlist 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\Administrator\AppData\Local\Temp\2\pip-build-env-84ns6ak9\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 tiktoken frozenlist multidict ERROR: Could not build wheels for tiktoken, frozenlist, multidict, which is required to install pyproject.toml-based projects

RockChinQ commented 8 months ago

python 3.13 ?可能是版本太高了,建议使用3.9 - 3.11 之间(含)的版本

shecong commented 8 months ago

使用的是安装器自带的3.10的

RockChinQ commented 8 months ago

自动部署的Python是独立的,在安装器同目录下的Python目录下,要安装依赖请使用这个目录下的python.exe可执行文件来执行。

shecong commented 8 months ago

我没有其他操作启动的时候就提示没有 callgpt,有解决方案吗在 2023年11月29日,18:42,Junyan Qin @.***> 写道: 自动部署的Python是独立的,在安装器同目录下的Python目录下,要安装依赖请使用这个目录下的python.exe可执行文件来执行。

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

RockChinQ commented 8 months ago

我没有其他操作启动的时候就提示没有 callgpt,有解决方案吗在 2023年11月29日,18:42,Junyan Qin @.> 写道: 自动部署的Python是独立的,在安装器同目录下的Python目录下,要安装依赖请使用这个目录下的python.exe可执行文件来执行。 —Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.>

shecong commented 8 months ago

手动部署可以部署在 windowssever 云服务器上吗?在 2023年11月29日,18:47,Junyan Qin @.***> 写道:

我没有其他操作启动的时候就提示没有 callgpt,有解决方案吗在 2023年11月29日,18:42,Junyan Qin @.> 写道: 自动部署的Python是独立的,在安装器同目录下的Python目录下,要安装依赖请使用这个目录下的python.exe可执行文件来执行。 —Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.>

自行确定你启动用的是安装器部署的独立的python还是系统自带python。 必须在你启动QChatGPT 的python环境中安装依赖。 难以确定:建议手动部署

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

shecong commented 8 months ago

大佬能远程帮助一下吗在 2023年11月29日,18:47,Junyan Qin @.***> 写道:

我没有其他操作启动的时候就提示没有 callgpt,有解决方案吗在 2023年11月29日,18:42,Junyan Qin @.> 写道: 自动部署的Python是独立的,在安装器同目录下的Python目录下,要安装依赖请使用这个目录下的python.exe可执行文件来执行。 —Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.>

自行确定你启动用的是安装器部署的独立的python还是系统自带python。 必须在你启动QChatGPT 的python环境中安装依赖。 难以确定:建议手动部署

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

RockChinQ commented 8 months ago

手动部署支持所有平台,加文档中的社区群有人可以帮忙部署