PaddlePaddle / PaddleHub

Awesome pre-trained models toolkit based on PaddlePaddle. (400+ models including Image, Text, Audio, Video and Cross-Modal with Easy Inference & Serving)【安全加固,暂停交互,请耐心等待】
https://www.paddlepaddle.org.cn/hub
Apache License 2.0
12.73k stars 2.08k forks source link

centos 7.6 安装paddlehub报错 #1870

Open ghost opened 2 years ago

ghost commented 2 years ago

paddlepaddle版本 2.3.0 使用pip命令安装paddlehub时出错 报错信息如下:

Collecting seqeval
  Using cached http://mirrors.cloud.aliyuncs.com/pypi/packages/9d/2d/233c79d5b4e5ab1dbf111242299153f3caddddbb691219f363ad55ce783d/seqeval-1.2.2.tar.gz (43 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [38 lines of output]
      /usr/local/python39/lib/python3.9/site-packages/setuptools/dist.py:772: UserWarning: Usage of dash-separated 'index-url' will not be supported in future versions. Please use the underscore name 'index_url' instead
        warnings.warn(
      /usr/local/python39/lib/python3.9/site-packages/setuptools/installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
        warnings.warn(
      WARNING: The repository located at mirrors.cloud.aliyuncs.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.cloud.aliyuncs.com'.
      ERROR: Could not find a version that satisfies the requirement setuptools_scm (from versions: none)
      ERROR: No matching distribution found for setuptools_scm
      Traceback (most recent call last):
        File "/usr/local/python39/lib/python3.9/site-packages/setuptools/installer.py", line 82, in fetch_build_egg
          subprocess.check_call(cmd)
        File "/usr/local/python39/lib/python3.9/subprocess.py", line 373, in check_call
          raise CalledProcessError(retcode, cmd)
      subprocess.CalledProcessError: Command '['/usr/local/bin/python3', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmpyfeyl2px', '--quiet', '--index-url', 'http://mirrors.cloud.aliyuncs.com/pypi/simple/', 'setuptools_scm']' 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-btei3w6x/seqeval_a31337ad7f3847e180d33dd914c3ee22/setup.py", line 27, in <module>
          setup(
        File "/usr/local/python39/lib/python3.9/site-packages/setuptools/__init__.py", line 86, in setup
          _install_setup_requires(attrs)
        File "/usr/local/python39/lib/python3.9/site-packages/setuptools/__init__.py", line 80, in _install_setup_requires
          dist.fetch_build_eggs(dist.setup_requires)
        File "/usr/local/python39/lib/python3.9/site-packages/setuptools/dist.py", line 876, in fetch_build_eggs
          resolved_dists = pkg_resources.working_set.resolve(
        File "/usr/local/python39/lib/python3.9/site-packages/pkg_resources/__init__.py", line 789, in resolve
          dist = best[req.key] = env.best_match(
        File "/usr/local/python39/lib/python3.9/site-packages/pkg_resources/__init__.py", line 1075, in best_match
          return self.obtain(req, installer)
        File "/usr/local/python39/lib/python3.9/site-packages/pkg_resources/__init__.py", line 1087, in obtain
          return installer(requirement)
        File "/usr/local/python39/lib/python3.9/site-packages/setuptools/dist.py", line 956, in fetch_build_egg
          return fetch_build_egg(self, req)
        File "/usr/local/python39/lib/python3.9/site-packages/setuptools/installer.py", line 84, in fetch_build_egg
          raise DistutilsError(str(e)) from e
      distutils.errors.DistutilsError: Command '['/usr/local/bin/python3', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmpyfeyl2px', '--quiet', '--index-url', 'http://mirrors.cloud.aliyuncs.com/pypi/simple/', 'setuptools_scm']' 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.

尝试使用pip安装 seqeval,报错 信息如下

Collecting seqeval
  Using cached http://mirrors.cloud.aliyuncs.com/pypi/packages/9d/2d/233c79d5b4e5ab1dbf111242299153f3caddddbb691219f363ad55ce783d/seqeval-1.2.2.tar.gz (43 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [38 lines of output]
      /usr/local/python39/lib/python3.9/site-packages/setuptools/dist.py:772: UserWarning: Usage of dash-separated 'index-url' will not be supported in future versions. Please use the underscore name 'index_url' instead
        warnings.warn(
      /usr/local/python39/lib/python3.9/site-packages/setuptools/installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
        warnings.warn(
      WARNING: The repository located at mirrors.cloud.aliyuncs.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.cloud.aliyuncs.com'.
      ERROR: Could not find a version that satisfies the requirement setuptools_scm (from versions: none)
      ERROR: No matching distribution found for setuptools_scm
      Traceback (most recent call last):
        File "/usr/local/python39/lib/python3.9/site-packages/setuptools/installer.py", line 82, in fetch_build_egg
          subprocess.check_call(cmd)
        File "/usr/local/python39/lib/python3.9/subprocess.py", line 373, in check_call
          raise CalledProcessError(retcode, cmd)
      subprocess.CalledProcessError: Command '['/usr/local/bin/python3', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmpodn5dybq', '--quiet', '--index-url', 'http://mirrors.cloud.aliyuncs.com/pypi/simple/', 'setuptools_scm']' 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-2tfyws9t/seqeval_853eeb8988e64081b702b518c3cde70a/setup.py", line 27, in <module>
          setup(
        File "/usr/local/python39/lib/python3.9/site-packages/setuptools/__init__.py", line 86, in setup
          _install_setup_requires(attrs)
        File "/usr/local/python39/lib/python3.9/site-packages/setuptools/__init__.py", line 80, in _install_setup_requires
          dist.fetch_build_eggs(dist.setup_requires)
        File "/usr/local/python39/lib/python3.9/site-packages/setuptools/dist.py", line 876, in fetch_build_eggs
          resolved_dists = pkg_resources.working_set.resolve(
        File "/usr/local/python39/lib/python3.9/site-packages/pkg_resources/__init__.py", line 789, in resolve
          dist = best[req.key] = env.best_match(
        File "/usr/local/python39/lib/python3.9/site-packages/pkg_resources/__init__.py", line 1075, in best_match
          return self.obtain(req, installer)
        File "/usr/local/python39/lib/python3.9/site-packages/pkg_resources/__init__.py", line 1087, in obtain
          return installer(requirement)
        File "/usr/local/python39/lib/python3.9/site-packages/setuptools/dist.py", line 956, in fetch_build_egg
          return fetch_build_egg(self, req)
        File "/usr/local/python39/lib/python3.9/site-packages/setuptools/installer.py", line 84, in fetch_build_egg
          raise DistutilsError(str(e)) from e
      distutils.errors.DistutilsError: Command '['/usr/local/bin/python3', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmpodn5dybq', '--quiet', '--index-url', 'http://mirrors.cloud.aliyuncs.com/pypi/simple/', 'setuptools_scm']' 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.

尝试使用pip安装 metadata,报错 信息如下:

Collecting metadata
  Using cached http://mirrors.cloud.aliyuncs.com/pypi/packages/8a/2b/3982e589808af51d6e8d3f7ebb6c540005ad3466d1e4939e57d25cd1d3c0/metadata-0.2.tar.gz (1.5 kB)
  Preparing metadata (setup.py) ... done
  Using cached http://mirrors.cloud.aliyuncs.com/pypi/packages/cd/ae/bd9c209313be8d9f794089439246c667e82bc6770f306143f4cb88251294/metadata-0.1.1.tar.gz (1.5 kB)
  Preparing metadata (setup.py) ... done
  Using cached http://mirrors.cloud.aliyuncs.com/pypi/packages/72/d2/6b26fa0d9e0a43e6a1182c32bcc4e2854d3dc42b5bb3a61e882635bb910a/metadata-0.1.tar.gz (1.1 kB)
  Preparing metadata (setup.py) ... done
ERROR: Cannot install metadata==0.1, metadata==0.1.1 and metadata==0.2 because these package versions have conflicting dependencies.

The conflict is caused by:
    metadata 0.2 depends on hachoir-core==1.3.3
    metadata 0.1.1 depends on hachoir-core==1.3.3
    metadata 0.1 depends on hachoir-core==1.3.3

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts
ghost commented 2 years ago

最后提示依赖的 hachoir-core==1.3.3 在PYPI中没有查找到任何信息

KPatr1ck commented 2 years ago

ERROR: Could not find a version that satisfies the requirement setuptools_scm (from versions: none) ERROR: No matching distribution found for setuptools_scm

检查下这个 setuptools_scm,或者换个 python 环境再尝试。

zoushanjun commented 2 years ago

Centos操作系统要选择开发版 image

1731368213 commented 1 year ago

问题解决了吗 如何解决的呢

sutanglime commented 1 year ago

问题解决了吗?我也遇到了这个报错,但我是在win10用pip下载paddlehub的时候遇到的

zoushanjun commented 1 year ago

使用centos 7.8开发版解决问题

------------------ 原始邮件 ------------------ 发件人: "PaddlePaddle/PaddleHub" @.>; 发送时间: 2023年3月14日(星期二) 晚上8:33 @.>; @.**@.>; 主题: Re: [PaddlePaddle/PaddleHub] centos 7.6 安装paddlehub报错 (Issue #1870)

问题解决了吗?我也遇到了这个报错,但我是在win10用pip下载paddlehub的时候遇到的

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