安装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
相关推荐
魔道不误砍柴功几秒前
实际开发中的协变与逆变案例:数据处理流水线
java·开发语言
鲤籽鲲9 分钟前
C# MethodTimer.Fody 使用详解
开发语言·c#·mfc
亚图跨际12 分钟前
Python和R荧光分光光度法
开发语言·python·r语言·荧光分光光度法
Rverdoser20 分钟前
RabbitMQ的基本概念和入门
开发语言·后端·ruby
dj244294570724 分钟前
JAVA中的Lamda表达式
java·开发语言
谢眠29 分钟前
深度学习day3-自动微分
python·深度学习·机器学习
z千鑫38 分钟前
【人工智能】深入理解PyTorch:从0开始完整教程!全文注解
人工智能·pytorch·python·gpt·深度学习·ai编程
流星白龙1 小时前
【C++习题】10.反转字符串中的单词 lll
开发语言·c++
尘浮生1 小时前
Java项目实战II基于微信小程序的校运会管理系统(开发文档+数据库+源码)
java·开发语言·数据库·微信小程序·小程序·maven·intellij-idea