Python使用pip安装No matching distribution found for PyYaml==5.3.1
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的版本是否支持
复制请注明出处,在世界中挣扎的灰太狼