[缺陷描述]: 安装docker-compose失败,疑似PyYAML与当前测试环境不兼容,导致安装失败 失败日志如下: # pip3 install docker-compose Looking in indexes: http://mirrors.cloud.aliyuncs.com/pypi/simple/ Collecting docker-compose Using cached http://mirrors.cloud.aliyuncs.com/pypi/packages/f3/3e/ca05e486d44e38eb495ca60b8ca526b192071717387346ed1031ecf78966/docker_compose-1.29.2-py2.py3-none-any.whl (114 kB) Collecting PyYAML<6,>=3.10 (from docker-compose) Using cached http://mirrors.cloud.aliyuncs.com/pypi/packages/a0/a4/d63f2d7597e1a4b55aa3b4d6c5b029991d3b824b5bd331af8d4ab1ed687d/PyYAML-5.4.1.tar.gz (175 kB) Installing build dependencies ... done Getting requirements to build wheel ... error error: subprocess-exited-with-error × Getting requirements to build wheel did not run successfully. │ exit code: 1 ╰─> [63 lines of output] /tmp/pip-build-env-hcvkpe50/overlay/lib/python3.10/site-packages/setuptools/dist.py:472: SetuptoolsDeprecationWarning: Invalid dash-separated options !! ******************************************************************************** Usage of dash-separated 'index-url' will not be supported in future versions. Please use the underscore name 'index_url' instead. By 2024-Sep-26, you need to update your project and remove deprecated calls or your builds will no longer be supported. See https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for details. ******************************************************************************** !! opt = self.warn_dash_deprecation(opt, section) running egg_info writing lib3/PyYAML.egg-info/PKG-INFO writing dependency_links to lib3/PyYAML.egg-info/dependency_links.txt writing top-level names to lib3/PyYAML.egg-info/top_level.txt Traceback (most recent call last): File "/usr/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module> main() File "/usr/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main json_out['return_val'] = hook(**hook_input['kwargs']) File "/usr/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel return hook(config_settings) File "/tmp/pip-build-env-hcvkpe50/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 325, in get_requires_for_build_wheel return self._get_build_requires(config_settings, requirements=['wheel']) File "/tmp/pip-build-env-hcvkpe50/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 295, in _get_build_requires self.run_setup() File "/tmp/pip-build-env-hcvkpe50/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 311, in run_setup exec(code, locals()) File "<string>", line 271, in <module> File "/tmp/pip-build-env-hcvkpe50/overlay/lib/python3.10/site-packages/setuptools/__init__.py", line 103, in setup return distutils.core.setup(**attrs) File "/tmp/pip-build-env-hcvkpe50/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 185, in setup return run_commands(dist) File "/tmp/pip-build-env-hcvkpe50/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 201, in run_commands dist.run_commands() File "/tmp/pip-build-env-hcvkpe50/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands self.run_command(cmd) File "/tmp/pip-build-env-hcvkpe50/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 963, in run_command super().run_command(command) File "/tmp/pip-build-env-hcvkpe50/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command cmd_obj.run() File "/tmp/pip-build-env-hcvkpe50/overlay/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 321, in run self.find_sources() File "/tmp/pip-build-env-hcvkpe50/overlay/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 329, in find_sources mm.run() File "/tmp/pip-build-env-hcvkpe50/overlay/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 551, in run self.add_defaults() File "/tmp/pip-build-env-hcvkpe50/overlay/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 589, in add_defaults sdist.add_defaults(self) File "/tmp/pip-build-env-hcvkpe50/overlay/lib/python3.10/site-packages/setuptools/command/sdist.py", line 112, in add_defaults super().add_defaults() File "/tmp/pip-build-env-hcvkpe50/overlay/lib/python3.10/site-packages/setuptools/_distutils/command/sdist.py", line 251, in add_defaults self._add_defaults_ext() File "/tmp/pip-build-env-hcvkpe50/overlay/lib/python3.10/site-packages/setuptools/_distutils/command/sdist.py", line 336, in _add_defaults_ext self.filelist.extend(build_ext.get_source_files()) File "<string>", line 201, in get_source_files File "/tmp/pip-build-env-hcvkpe50/overlay/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 107, in __getattr__ raise AttributeError(attr) AttributeError: cython_sources [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error × Getting requirements to build wheel did not run successfully. │ exit code: 1 ╰─> See above for output. note: This error originates from a subprocess, and is likely not a problem with pip. [重现环境]: 环境信息:云上ecs OS:Anolis 23.1 x86_64 # cat /etc/os-release NAME="Anolis OS" VERSION="23" ID="anolis" VERSION_ID="23" PLATFORM_ID="platform:an23" PRETTY_NAME="Anolis OS 23" ANSI_COLOR="0;31" HOME_URL="https://openanolis.cn/" BUG_REPORT_URL="https://bugzilla.openanolis.cn/" KERNEL: # uname -r 5.10.134-16.2_rc1.an23.x86_64 repo信息: Repo-id : os-Nightly Repo-name : AnolisOS-23 - os Repo-revision : 1704908709 Repo-updated : Wed 03 Jan 2024 02:13:36 PM CST Repo-baseurl : http://mirrors.openanolis.cn/anolis/23/Nightly/os/aarch64/os Repo-filename : /etc/yum.repos.d/AnolisOS-Nightly.repo Repo-id : updates-Nightly Repo-name : AnolisOS-23 - updates Repo-revision : 1692065947 Repo-updated : Tue 15 Aug 2023 10:19:07 AM CST Repo-baseurl : http://mirrors.openanolis.cn/anolis/23/Nightly/updates/aarch64/os Repo-filename : /etc/yum.repos.d/AnolisOS-Nightly.repo [重现步骤]: pip3 install docker-compose [期望结果]: docker-compose安装成功 [实际结果]: docker-compose安装失败
an8 上是OK的 [root@iZbp109lataf58vl8qfvsrZ ~]# python3 -m pip install --upgrade pip WARNING: Running pip install with root privileges is generally not a good idea. Try `__main__.py install --user` instead. Collecting pip Downloading http://mirrors.cloud.aliyuncs.com/pypi/packages/a4/6d/6463d49a933f547439d6b5b98b46af8742cc03ae83543e4d7688c2420f8b/pip-21.3.1-py3-none-any.whl (1.7MB) 100% |████████████████████████████████| 1.7MB 183.8MB/s Installing collected packages: pip Successfully installed pip-21.3.1 You are using pip version 21.3.1, however version 23.3.2 is available. You should consider upgrading via the 'pip install --upgrade pip' command. [root@iZbp109lataf58vl8qfvsrZ ~]# pip3 install docker-compose WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip. Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue. To avoid this problem you can invoke Python with '-m pip' instead of running pip directly. Looking in indexes: http://mirrors.cloud.aliyuncs.com/pypi/simple/ Collecting docker-compose Downloading http://mirrors.cloud.aliyuncs.com/pypi/packages/f3/3e/ca05e486d44e38eb495ca60b8ca526b192071717387346ed1031ecf78966/docker_compose-1.29.2-py2.py3-none-any.whl (114 kB) |████████████████████████████████| 114 kB 16.0 MB/s Collecting python-dotenv<1,>=0.13.0 Downloading http://mirrors.cloud.aliyuncs.com/pypi/packages/30/5f/2e5c564bd86349fe6b82ca840f46acf6f4bb76d79ba9057fce3d3e008864/python_dotenv-0.20.0-py3-none-any.whl (17 kB) Requirement already satisfied: requests<3,>=2.20.0 in /usr/lib/python3.6/site-packages (from docker-compose) (2.20.0) Collecting docker[ssh]>=5 Downloading http://mirrors.cloud.aliyuncs.com/pypi/packages/54/f3/7af47ead249fbb798d64a0438bad5c26f17ef6ac5cd324d802038eb10d90/docker-5.0.3-py2.py3-none-any.whl (146 kB) |████████████████████████████████| 146 kB 16.0 MB/s Collecting distro<2,>=1.5.0 Downloading http://mirrors.cloud.aliyuncs.com/pypi/packages/12/b3/231ffd4ab1fc9d679809f356cebee130ac7daa00d6d6f3206dd4fd137e9e/distro-1.9.0-py3-none-any.whl (20 kB) Requirement already satisfied: jsonschema<4,>=2.5.1 in /usr/lib/python3.6/site-packages (from docker-compose) (2.6.0) Collecting docopt<1,>=0.6.1 Downloading http://mirrors.cloud.aliyuncs.com/pypi/packages/a2/55/8f8cab2afd404cf578136ef2cc5dfb50baa1761b68c9da1fb1e4eed343c9/docopt-0.6.2.tar.gz (25 kB) Preparing metadata (setup.py) ... done Collecting texttable<2,>=0.9.0 Downloading http://mirrors.cloud.aliyuncs.com/pypi/packages/24/99/4772b8e00a136f3e01236de33b0efda31ee7077203ba5967fcc76da94d65/texttable-1.7.0-py2.py3-none-any.whl (10 kB) Collecting PyYAML<6,>=3.10 Downloading http://mirrors.cloud.aliyuncs.com/pypi/packages/7a/5b/bc0b5ab38247bba158504a410112b6c03f153c652734ece1849749e5f518/PyYAML-5.4.1-cp36-cp36m-manylinux1_x86_64.whl (640 kB) |████████████████████████████████| 640 kB 16.3 MB/s Collecting websocket-client<1,>=0.32.0 Downloading http://mirrors.cloud.aliyuncs.com/pypi/packages/f7/0c/d52a2a63512a613817846d430d16a8fbe5ea56dd889e89c68facf6b91cb6/websocket_client-0.59.0-py2.py3-none-any.whl (67 kB) |████████████████████████████████| 67 kB 22.5 MB/s Collecting cached-property<2,>=1.2.0 Downloading http://mirrors.cloud.aliyuncs.com/pypi/packages/48/19/f2090f7dad41e225c7f2326e4cfe6fff49e57dedb5b53636c9551f86b069/cached_property-1.5.2-py2.py3-none-any.whl (7.6 kB) Collecting dockerpty<1,>=0.4.1 Downloading http://mirrors.cloud.aliyuncs.com/pypi/packages/8d/ee/e9ecce4c32204a6738e0a5d5883d3413794d7498fe8b06f44becc028d3ba/dockerpty-0.4.1.tar.gz (13 kB) Preparing metadata (setup.py) ... done Collecting paramiko>=2.4.2 Downloading http://mirrors.cloud.aliyuncs.com/pypi/packages/ad/50/8792484502c8141c20c996b802fefa8435a9c018a2bb440a06b172782118/paramiko-3.4.0-py3-none-any.whl (225 kB) |████████████████████████████████| 225 kB 28.5 MB/s Requirement already satisfied: six>=1.3.0 in /usr/lib/python3.6/site-packages (from dockerpty<1,>=0.4.1->docker-compose) (1.11.0) Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /usr/lib/python3.6/site-packages (from requests<3,>=2.20.0->docker-compose) (3.0.4) Requirement already satisfied: idna<2.8,>=2.5 in /usr/lib/python3.6/site-packages (from requests<3,>=2.20.0->docker-compose) (2.5) Requirement already satisfied: urllib3<1.25,>=1.21.1 in /usr/lib/python3.6/site-packages (from requests<3,>=2.20.0->docker-compose) (1.24.2) Collecting bcrypt>=3.2 Downloading http://mirrors.cloud.aliyuncs.com/pypi/packages/64/fe/da28a5916128d541da0993328dc5cf4b43dfbf6655f2c7a2abe26ca2dc88/bcrypt-4.0.1-cp36-abi3-manylinux_2_28_x86_64.whl (593 kB) |████████████████████████████████| 593 kB 29.1 MB/s Collecting pynacl>=1.5 Downloading http://mirrors.cloud.aliyuncs.com/pypi/packages/ee/87/f1bb6a595f14a327e8285b9eb54d41fef76c585a0edef0a45f6fc95de125/PyNaCl-1.5.0-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl (856 kB) |████████████████████████████████| 856 kB 140.4 MB/s Collecting cryptography>=3.3 Downloading http://mirrors.cloud.aliyuncs.com/pypi/packages/8e/34/f54dbfc6d12fa34a50f03bf01319d585e7e9bddd68ad28299b4998e3098b/cryptography-40.0.2-cp36-abi3-manylinux_2_28_x86_64.whl (3.7 MB) |████████████████████████████████| 3.7 MB 15.1 MB/s Collecting cffi>=1.12 Downloading http://mirrors.cloud.aliyuncs.com/pypi/packages/3a/12/d6066828014b9ccb2bbb8e1d9dc28872d20669b65aeb4a86806a0757813f/cffi-1.15.1-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl (402 kB) |████████████████████████████████| 402 kB 164.3 MB/s Requirement already satisfied: pycparser in /usr/lib/python3.6/site-packages (from cffi>=1.12->cryptography>=3.3->paramiko>=2.4.2->docker[ssh]>=5->docker-compose) (2.14) Using legacy 'setup.py install' for dockerpty, since package 'wheel' is not installed. Using legacy 'setup.py install' for docopt, since package 'wheel' is not installed. Installing collected packages: cffi, websocket-client, pynacl, cryptography, bcrypt, paramiko, docker, texttable, PyYAML, python-dotenv, docopt, dockerpty, distro, cached-property, docker-compose Attempting uninstall: cffi Found existing installation: cffi 1.11.5 Uninstalling cffi-1.11.5: Successfully uninstalled cffi-1.11.5 Attempting uninstall: cryptography Found existing installation: cryptography 3.2.1 Uninstalling cryptography-3.2.1: Successfully uninstalled cryptography-3.2.1 Attempting uninstall: PyYAML Found existing installation: PyYAML 6.0.1 Uninstalling PyYAML-6.0.1: Successfully uninstalled PyYAML-6.0.1 Running setup.py install for docopt ... done Running setup.py install for dockerpty ... done Successfully installed PyYAML-5.4.1 bcrypt-4.0.1 cached-property-1.5.2 cffi-1.15.1 cryptography-40.0.2 distro-1.9.0 docker-5.0.3 docker-compose-1.29.2 dockerpty-0.4.1 docopt-0.6.2 paramiko-3.4.0 pynacl-1.5.0 python-dotenv-0.20.0 texttable-1.7.0 websocket-client-0.59.0 WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
问题确认