ChenXu233 / nonebot_plugin_dialectlist

看看群友能有多话唠
28 stars 4 forks source link

pip install 安装报错 #15

Closed Yuelioi closed 1 year ago

Yuelioi commented 1 year ago

操作系统: linux centos

python 版本: 3.9.10

Looking in indexes: https://pypi.python.org/simple
Collecting nonebot-plugin-dialectlist
  Downloading nonebot-plugin-dialectlist-1.3.3.tar.gz (7.0 kB)
  Preparing metadata (setup.py) ... done
Collecting pygal
  Downloading pygal-3.0.0-py2.py3-none-any.whl (129 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 129.4/129.4 kB 238.5 kB/s eta 0:00:00
Collecting cairosvg
  Downloading CairoSVG-2.5.2-py3-none-any.whl (45 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 45.8/45.8 kB 34.9 kB/s eta 0:00:00
Requirement already satisfied: nonebot-adapter-onebot in ./87b7cb79481f317bde90c116cf36084b_venv/lib/python3.9/site-packages (from nonebot-plugin-dialectlist) (2.1.5)
Collecting nonebot_plugin_guild_patch
  Downloading nonebot_plugin_guild_patch-0.2.1-py3-none-any.whl (7.0 kB)
Collecting nonebot_plugin_chatrecorder
  Downloading nonebot_plugin_chatrecorder-0.1.9-py3-none-any.whl (5.8 kB)
Collecting nonebot-plugin-chatrecorder-guild-patch
  Downloading nonebot-plugin-chatrecorder-guild-patch-0.1.2.tar.gz (2.2 kB)
  Preparing metadata (setup.py) ... done
Collecting defusedxml
  Downloading defusedxml-0.7.1-py2.py3-none-any.whl (25 kB)
Requirement already satisfied: pillow in ./87b7cb79481f317bde90c116cf36084b_venv/lib/python3.9/site-packages (from cairosvg->nonebot-plugin-dialectlist) (9.3.0)
Collecting tinycss2
  Downloading tinycss2-1.2.1-py3-none-any.whl (21 kB)
Collecting cssselect2
  Downloading cssselect2-0.7.0-py3-none-any.whl (15 kB)
Collecting cairocffi
  Downloading cairocffi-1.4.0.tar.gz (69 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 69.9/69.9 kB 27.3 kB/s eta 0:00:00
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [36 lines of output]
      /www/wwwroot/project/Robot/nobotX/87b7cb79481f317bde90c116cf36084b_venv/lib/python3.9/site-packages/setuptools/dist.py:717: UserWarning: Usage of dash-separated 'index-url' will not be supported in future versions. Please use the underscore name 'index_url' instead
        warnings.warn(
      WARNING: The repository located at mirrors.tencentyun.com is not a trusted or secure host and is being ignored. If this repository is available via HTTPS we recommend you use HTTPS instead, otherwise you may silence this warning and allow it anyway with '--trusted-host mirrors.tencentyun.com'.
      ERROR: Could not find a version that satisfies the requirement cffi>=1.1.0 (from versions: none)
      ERROR: No matching distribution found for cffi>=1.1.0
      Traceback (most recent call last):
        File "/www/wwwroot/project/Robot/nobotX/87b7cb79481f317bde90c116cf36084b_venv/lib/python3.9/site-packages/setuptools/installer.py", line 75, in fetch_build_egg
          subprocess.check_call(cmd)
        File "/www/wwwroot/project/Robot/nobotX/87b7cb79481f317bde90c116cf36084b_venv/lib/python3.9/subprocess.py", line 373, in check_call
          raise CalledProcessError(retcode, cmd)
      subprocess.CalledProcessError: Command '['/www/wwwroot/project/Robot/nobotX/87b7cb79481f317bde90c116cf36084b_venv/bin/python3', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmpkqmkyhpm', '--quiet', '--index-url', 'http://mirrors.tencentyun.com/pypi/simple', 'cffi>=1.1.0']' returned non-zero exit status 1.

      The above exception was the direct cause of the following exception:

      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-install-xko3f674/cairocffi_ec867d25dc2e49f299067f92ba92c1cc/setup.py", line 10, in <module>
          setup(
        File "/www/wwwroot/project/Robot/nobotX/87b7cb79481f317bde90c116cf36084b_venv/lib/python3.9/site-packages/setuptools/__init__.py", line 152, in setup
          _install_setup_requires(attrs)
        File "/www/wwwroot/project/Robot/nobotX/87b7cb79481f317bde90c116cf36084b_venv/lib/python3.9/site-packages/setuptools/__init__.py", line 147, in _install_setup_requires
          dist.fetch_build_eggs(dist.setup_requires)
        File "/www/wwwroot/project/Robot/nobotX/87b7cb79481f317bde90c116cf36084b_venv/lib/python3.9/site-packages/setuptools/dist.py", line 806, in fetch_build_eggs
          resolved_dists = pkg_resources.working_set.resolve(
        File "/www/wwwroot/project/Robot/nobotX/87b7cb79481f317bde90c116cf36084b_venv/lib/python3.9/site-packages/pkg_resources/__init__.py", line 766, in resolve
          dist = best[req.key] = env.best_match(
        File "/www/wwwroot/project/Robot/nobotX/87b7cb79481f317bde90c116cf36084b_venv/lib/python3.9/site-packages/pkg_resources/__init__.py", line 1051, in best_match
          return self.obtain(req, installer)
        File "/www/wwwroot/project/Robot/nobotX/87b7cb79481f317bde90c116cf36084b_venv/lib/python3.9/site-packages/pkg_resources/__init__.py", line 1063, in obtain
          return installer(requirement)
        File "/www/wwwroot/project/Robot/nobotX/87b7cb79481f317bde90c116cf36084b_venv/lib/python3.9/site-packages/setuptools/dist.py", line 877, in fetch_build_egg
          return fetch_build_egg(self, req)
        File "/www/wwwroot/project/Robot/nobotX/87b7cb79481f317bde90c116cf36084b_venv/lib/python3.9/site-packages/setuptools/installer.py", line 77, in fetch_build_egg
          raise DistutilsError(str(e)) from e
      distutils.errors.DistutilsError: Command '['/www/wwwroot/project/Robot/nobotX/87b7cb79481f317bde90c116cf36084b_venv/bin/python3', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmpkqmkyhpm', '--quiet', '--index-url', 'http://mirrors.tencentyun.com/pypi/simple', 'cffi>=1.1.0']' 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: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
ChenXu233 commented 1 year ago

我找到一篇相似问题的issue,可以在当中找找解决方案

相似问题:

https://github.com/mindsdb/mindsdb/issues/2199#issuecomment-1124044944 通过报错描述发现都是

Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error

问题解决

问题可能在于python版本的不兼容 https://github.com/mindsdb/mindsdb/issues/2199#issuecomment-1157725435 预览: image