首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用pip安装matplotlib或certifi时出现问题

使用pip安装matplotlib或certifi时出现问题
EN

Stack Overflow用户
提问于 2021-03-16 06:31:33
回答 1查看 45关注 0票数 0

这是在运行arch linux的基于arm的机器上。

代码语言:javascript
复制
 ERROR: Requested certifi>=2020.06.20 from https://files.pythonhosted.org/packages/5e/a0/5f06e1e1d463903cf0c0eebeb751791119ed7a4b3737fdc9a77f1cdfb51f/certifi-2020.12.5-py2.py3-none-any.whl#sha256=719a74fb9e33b9bd44cc7f3a8d94bc35e4049deebe19ba7d8e108280cfd59830 has different version in metadata: '2020.12.5'
    Traceback (most recent call last):
      File "/usr/lib/python3.9/site-packages/setuptools/installer.py", line 75, in fetch_build_egg
        subprocess.check_call(cmd)
      File "/usr/lib/python3.9/subprocess.py", line 373, in check_call
        raise CalledProcessError(retcode, cmd)
    subprocess.CalledProcessError: Command '['/usr/bin/python', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmponkebyxp', '--quiet', 'certifi>=2020.06.20']' returned non-zero exit status 1.
代码语言:javascript
复制
 The above exception was the direct cause of the following exception:

    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-94nlrun8/matplotlib/setup.py", line 256, in <module>
        setup(  # Finally, pass this all along to distutils to do the heavy lifting.
      File "/usr/lib/python3.9/site-packages/setuptools/__init__.py", line 152, in setup
        _install_setup_requires(attrs)
      File "/usr/lib/python3.9/site-packages/setuptools/__init__.py", line 147, in _install_setup_requires
        dist.fetch_build_eggs(dist.setup_requires)
      File "/usr/lib/python3.9/site-packages/setuptools/dist.py", line 721, in fetch_build_eggs
        resolved_dists = pkg_resources.working_set.resolve(
      File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 766, in resolve
        dist = best[req.key] = env.best_match(
      File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 1051, in best_match
        return self.obtain(req, installer)
      File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 1063, in obtain
        return installer(requirement)
      File "/usr/lib/python3.9/site-packages/setuptools/dist.py", line 780, in fetch_build_egg
        return fetch_build_egg(self, req)
      File "/usr/lib/python3.9/site-packages/setuptools/installer.py", line 77, in fetch_build_egg
        raise DistutilsError(str(e)) from e
    distutils.errors.DistutilsError: Command '['/usr/bin/python', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmponkebyxp', '--quiet', 'certifi>=2020.06.20']' returned non-zero exit status 1.

我试着回答其他问题,但没有一个人对我有帮助。

我运行的命令是python -m pip install matplotlib

如果我运行python -m pip install certifi,也会发生同样的情况

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2021-03-22 18:35:21

我找到了一种解决方法。您几乎可以将任何python库作为一个包进行安装。像这样做比摆弄python更容易,因为我不经常使用它。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/66646585

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档