安装Paddlehub报错

我在安装Paddlehub时遇到了各种报错,我遇到的主要遇到以下错误, subprocess-exited-with-error以及 metadata-generation-failed。

其实在报错中就给出了解决方法,但是我没有注意...因此还浪费了很多时间,其实只要加上--use-

pep517就可以了。

bash 复制代码
  Preparing metadata (setup.py) ... done
Collecting seqeval (from paddlenlp>=2.0.0->paddlehub==2.3.0)
  Using cached http://mirrors.aliyun.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
  __> [48 lines of output]
      WARNING: The repository located at mirrors.aliyun.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.aliyun.com'.
      ERROR: Could not find a version that satisfies the requirement setuptools_scm (from versions: none)
      ERROR: No matching distribution found for setuptools_scm
      /opt/data/private/anaconda3/envs/paddle_hrsegnet/lib/python3.8/site-packages/setuptools/__init__.py:80: _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)
      Traceback (most recent call last):
        File "/opt/data/private/anaconda3/envs/paddle_hrsegnet/lib/python3.8/site-packages/setuptools/installer.py", line 101, in _fetch_build_egg_no_warn
          subprocess.check_call(cmd)
        File "/opt/data/private/anaconda3/envs/paddle_hrsegnet/lib/python3.8/subprocess.py", line 364, in check_call
          raise CalledProcessError(retcode, cmd)
      subprocess.CalledProcessError: Command '['/opt/data/private/anaconda3/envs/paddle_hrsegnet/bin/python3.8', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmpr05krkvk', '--quiet', 'setuptools_scm']' returned non-zero exit status 1.
      

        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-install-6x288_4j/seqeval_5a6ef0cdabf24d6dab49069c1ddaef00/setup.py", line 27, in <module>
          setup(
        File "/opt/data/private/anaconda3/envs/paddle_hrsegnet/lib/python3.8/site-packages/setuptools/__init__.py", line 102, in setup
          _install_setup_requires(attrs)
        File "/opt/data/private/anaconda3/envs/paddle_hrsegnet/lib/python3.8/site-packages/setuptools/__init__.py", line 75, in _install_setup_requires
          _fetch_build_eggs(dist)
        File "/opt/data/private/anaconda3/envs/paddle_hrsegnet/lib/python3.8/site-packages/setuptools/__init__.py", line 80, in _fetch_build_eggs
          dist.fetch_build_eggs(dist.setup_requires)
        File "/opt/data/private/anaconda3/envs/paddle_hrsegnet/lib/python3.8/site-packages/setuptools/dist.py", line 636, in fetch_build_eggs
          return _fetch_build_eggs(self, requires)
        File "/opt/data/private/anaconda3/envs/paddle_hrsegnet/lib/python3.8/site-packages/setuptools/installer.py", line 38, in _fetch_build_eggs
          resolved_dists = pkg_resources.working_set.resolve(
        File "/opt/data/private/anaconda3/envs/paddle_hrsegnet/lib/python3.8/site-packages/pkg_resources/__init__.py", line 829, in resolve
          dist = self._resolve_dist(
        File "/opt/data/private/anaconda3/envs/paddle_hrsegnet/lib/python3.8/site-packages/pkg_resources/__init__.py", line 865, in _resolve_dist
          dist = best[req.key] = env.best_match(
        File "/opt/data/private/anaconda3/envs/paddle_hrsegnet/lib/python3.8/site-packages/pkg_resources/__init__.py", line 1135, in best_match
          return self.obtain(req, installer)
        File "/opt/data/private/anaconda3/envs/paddle_hrsegnet/lib/python3.8/site-packages/pkg_resources/__init__.py", line 1147, in obtain
          return installer(requirement)
        File "/opt/data/private/anaconda3/envs/paddle_hrsegnet/lib/python3.8/site-packages/setuptools/installer.py", line 103, in _fetch_build_egg_no_warn
          raise DistutilsError(str(e)) from e
      distutils.errors.DistutilsError: Command '['/opt/data/private/anaconda3/envs/paddle_hrsegnet/bin/python3.8', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmpr05krkvk', '--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.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
bash 复制代码
pip cache purge 

pip install --use-pep517 paddlehub -i https://mirror.baidu.com/pypi/simple
相关推荐
BinaryBardC1 小时前
Swift语言的网络编程
开发语言·后端·golang
code_shenbing1 小时前
基于 WPF 平台使用纯 C# 制作流体动画
开发语言·c#·wpf
邓熙榆1 小时前
Haskell语言的正则表达式
开发语言·后端·golang
大懒猫软件2 小时前
如何运用python爬虫获取大型资讯类网站文章,并同时导出pdf或word格式文本?
python·深度学习·自然语言处理·网络爬虫
ac-er88882 小时前
Yii框架中的队列:如何实现异步操作
android·开发语言·php
马船长2 小时前
青少年CTF练习平台 PHP的后门
开发语言·php
XianxinMao3 小时前
RLHF技术应用探析:从安全任务到高阶能力提升
人工智能·python·算法
hefaxiang3 小时前
【C++】函数重载
开发语言·c++·算法
落幕4 小时前
C语言-构造数据类型
c语言·开发语言
勤又氪猿4 小时前
【问题】Qt c++ 界面 lineEdit、comboBox、tableWidget.... SIGSEGV错误
开发语言·c++·qt