Python seqeval包安装报错: error: subprocess-exited-with-error 解决方法


pip install seqeval 报错:error: subprocess-exited-with-error

报错信息如下

Collecting seqeval
  Using cached http:///pypi.tuna.tsinghua.edu.cn/simple/repository/pypi/packages/seqeval/1.2.2/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
  ╰─> [41 lines of output]
      /usr/local/lib/python3.9/site-packages/setuptools/__init__.py:85: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated. Requirements should be satisfied by a PEP 517 installer. If you are using pip, you can try `pip install --use-pep517`.
        dist.fetch_build_eggs(dist.setup_requires)
      WARNING: The repository located at 10.252.122.53 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 10.252.122.53'.
      WARNING: The repository located at 10.252.122.73 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 10.252.122.73'.
      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/lib/python3.9/site-packages/setuptools/installer.py", line 97, in _fetch_build_egg_no_warn
          subprocess.check_call(cmd)
        File "/usr/local/lib/python3.9/subprocess.py", line 373, in check_call
          raise CalledProcessError(retcode, cmd)
      subprocess.CalledProcessError: Command '['/usr/local/bin/python3.9', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmp7qlcb6cv', '--quiet', '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-wkr3reb8/seqeval_3ebb9a329bbe4b708b6997912d75d8a8/setup.py", line 27, in <module>
          setup(
        File "/usr/local/lib/python3.9/site-packages/setuptools/__init__.py", line 107, in setup
          _install_setup_requires(attrs)
        File "/usr/local/lib/python3.9/site-packages/setuptools/__init__.py", line 80, in _install_setup_requires
          _fetch_build_eggs(dist)
        File "/usr/local/lib/python3.9/site-packages/setuptools/__init__.py", line 85, in _fetch_build_eggs
          dist.fetch_build_eggs(dist.setup_requires)
        File "/usr/local/lib/python3.9/site-packages/setuptools/dist.py", line 894, in fetch_build_eggs
          return _fetch_build_eggs(self, requires)
        File "/usr/local/lib/python3.9/site-packages/setuptools/installer.py", line 39, in _fetch_build_eggs
          resolved_dists = pkg_resources.working_set.resolve(
        File "/usr/local/lib/python3.9/site-packages/pkg_resources/__init__.py", line 815, in resolve
          dist = self._resolve_dist(
        File "/usr/local/lib/python3.9/site-packages/pkg_resources/__init__.py", line 851, in _resolve_dist
          dist = best[req.key] = env.best_match(
        File "/usr/local/lib/python3.9/site-packages/pkg_resources/__init__.py", line 1123, in best_match
          return self.obtain(req, installer)
        File "/usr/local/lib/python3.9/site-packages/pkg_resources/__init__.py", line 1135, in obtain
          return installer(requirement)
        File "/usr/local/lib/python3.9/site-packages/setuptools/installer.py", line 99, in _fetch_build_egg_no_warn
          raise DistutilsError(str(e)) from e
      distutils.errors.DistutilsError: Command '['/usr/local/bin/python3.9', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmp7qlcb6cv', '--quiet', '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.

解决方法:


pip install --upgrade setuptools
pip install setuptools_scm

再次执行:pip install seqeval 安装成功

  • 4
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值