安装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
相关推荐
好吃的肘子20 分钟前
MongoDB 应用实战
大数据·开发语言·数据库·算法·mongodb·全文检索
ghost14322 分钟前
C#学习第23天:面向对象设计模式
开发语言·学习·设计模式·c#
小白学大数据23 分钟前
Scrapy框架下地图爬虫的进度监控与优化策略
开发语言·爬虫·python·scrapy·数据分析
浊酒南街24 分钟前
TensorFlow之微分求导
人工智能·python·tensorflow
立秋678930 分钟前
用Python绘制梦幻星空
开发语言·python·pygame
alpszero42 分钟前
YOLO11解决方案之对象裁剪探索
人工智能·python·计算机视觉·yolo11
明月看潮生1 小时前
青少年编程与数学 02-019 Rust 编程基础 16课题、包、单元包及模块
开发语言·青少年编程·rust·编程与数学
后青春期的诗go1 小时前
基于Rust语言的Rocket框架和Sqlx库开发WebAPI项目记录(二)
开发语言·后端·rust·rocket框架
白云千载尽1 小时前
相机、雷达标定工具,以及雷达自动标定的思路
python·自动驾驶·ros
咕噜咕噜啦啦1 小时前
python爬虫实战训练
爬虫·python