首页 > 编程语言 > 详细

Python使用pip安装No matching distribution found for PyYaml==5.3.1

时间:2021-02-15 23:36:23      阅读:553      评论:0      收藏:0      [点我收藏+]
 ERROR: Command errored out with exit status 1:
     command: /usr/local/dmahz/p_book_data/bin/python3.9 -c import sys, setuptools, tokenize; sys.argv[0] = ‘""‘/tmp/pip-install-yqn97g8t/pyyaml_30670ccf25cc4caf94c339671933c1ca/setup.py‘""‘; __file__=‘""‘/tmp/pip-install-yqn97g8t/pyyaml_30670ccf25cc4caf94c339671933c1ca/setup.py‘""‘;f=getattr(tokenize, ‘""‘open‘""‘, open)(__file__);code=f.read().replace(‘""‘\r\n‘""‘, ‘""‘\n‘""‘);f.close();exec(compile(code, __file__, ‘""‘exec‘""‘)) egg_info --egg-base /tmp/pip-pip-egg-info-vc7iszg1
         cwd: /tmp/pip-install-yqn97g8t/pyyaml_30670ccf25cc4caf94c339671933c1ca/
    Complete output (11 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/usr/local/dmahz/p_book_data/lib/python3.9/site-packages/setuptools/__init__.py", line 23, in <module>
        from setuptools.dist import Distribution
      File "/usr/local/dmahz/p_book_data/lib/python3.9/site-packages/setuptools/dist.py", line 34, in <module>
        from setuptools import windows_support
      File "/usr/local/dmahz/p_book_data/lib/python3.9/site-packages/setuptools/windows_support.py", line 2, in <module>
        import ctypes
      File "/usr/local/lib/python3.9/ctypes/__init__.py", line 8, in <module>
        from _ctypes import Union, Structure, Array
    ModuleNotFoundError: No module named _ctypes
    ----------------------------------------
WARNING: Discarding http://mirrors.tencentyun.com/pypi/packages/64/c2/b80047c7ac2478f9501676c988a5411ed5572f35d1beff9cae07d321512c/PyYAML-5.3.1.tar.gz#sha256=b8eac752c5e14d3eca0e6dd9199cd627518cb5ec06add0de9d32baeee6fe645d (from http://mirrors.tencentyun.com/pypi/simple/pyyaml/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement PyYaml==5.3.1
ERROR: No matching distribution found for PyYaml==5.3.1

解决方案就是 查看对应的python包是否支持当前python的版本,如果不支持就会出现上图异常,楼主是更新了一下包的版本(包支持当前python的版本)即可,

Python使用pip安装No matching distribution found for PyYaml==5.3.1

原文:https://www.cnblogs.com/XingXiaoMeng/p/14405453.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!