Installing on various on os fails due PyYAML -> Cython deps.
Hello everyone,
Install oci-clie leads in to an error caused by dependency to PyYAML and Cython:
pip install oci-cli==3.29.4 --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org
Collecting oci-cli==3.29.4
Downloading oci_cli-3.29.4-py3-none-any.whl (39.1 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 39.1/39.1 MB 50.6 kB/s eta 0:00:00
Collecting oci==2.107.0 (from oci-cli==3.29.4)
Downloading oci-2.107.0-py3-none-any.whl (21.7 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 21.7/21.7 MB 115.1 kB/s eta 0:00:00
Collecting arrow>=1.0.0 (from oci-cli==3.29.4)
Downloading arrow-1.2.3-py3-none-any.whl (66 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 66.4/66.4 kB 9.5 MB/s eta 0:00:00
Collecting certifi (from oci-cli==3.29.4)
Downloading certifi-2023.7.22-py3-none-any.whl (158 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 158.3/158.3 kB 20.6 MB/s eta 0:00:00
Collecting click==8.0.4 (from oci-cli==3.29.4)
Downloading click-8.0.4-py3-none-any.whl (97 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 97.5/97.5 kB 13.4 MB/s eta 0:00:00
Collecting cryptography<42.0.0,>=3.2.1 (from oci-cli==3.29.4)
Downloading cryptography-41.0.2-cp37-abi3-musllinux_1_1_x86_64.whl (4.4 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.4/4.4 MB 1.1 MB/s eta 0:00:00
Collecting jmespath==0.10.0 (from oci-cli==3.29.4)
Downloading jmespath-0.10.0-py2.py3-none-any.whl (24 kB)
Collecting python-dateutil<3.0.0,>=2.5.3 (from oci-cli==3.29.4)
Downloading python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 247.7/247.7 kB 25.4 MB/s eta 0:00:00
Collecting pytz>=2016.10 (from oci-cli==3.29.4)
Downloading pytz-2023.3-py2.py3-none-any.whl (502 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 502.3/502.3 kB 38.4 MB/s eta 0:00:00
Collecting six>=1.15.0 (from oci-cli==3.29.4)
Downloading six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting terminaltables==3.1.0 (from oci-cli==3.29.4)
Downloading terminaltables-3.1.0.tar.gz (12 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Collecting pyOpenSSL<24.0.0,>=17.5.0 (from oci-cli==3.29.4)
Downloading pyOpenSSL-23.2.0-py3-none-any.whl (59 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 59.0/59.0 kB 8.5 MB/s eta 0:00:00
Collecting PyYAML<=6,>=5.4 (from oci-cli==3.29.4)
Downloading PyYAML-6.0.tar.gz (124 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 125.0/125.0 kB 15.9 MB/s eta 0:00:00
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
╰─> [54 lines of output]
running egg_info
writing lib/PyYAML.egg-info/PKG-INFO
writing dependency_links to lib/PyYAML.egg-info/dependency_links.txt
writing top-level names to lib/PyYAML.egg-info/top_level.txt
Traceback (most recent call last):
File "/usr/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
main()
File "/usr/lib/python3.11/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.11/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-rdttxuu9/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 341, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=['wheel'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/pip-build-env-rdttxuu9/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 323, in _get_build_requires
self.run_setup()
File "/tmp/pip-build-env-rdttxuu9/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 338, in run_setup
exec(code, locals())
File "<string>", line 288, in <module>
File "/tmp/pip-build-env-rdttxuu9/overlay/lib/python3.11/site-packages/setuptools/__init__.py", line 107, in setup
return distutils.core.setup(**attrs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/pip-build-env-rdttxuu9/overlay/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 185, in setup
return run_commands(dist)
^^^^^^^^^^^^^^^^^^
File "/tmp/pip-build-env-rdttxuu9/overlay/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
dist.run_commands()
File "/tmp/pip-build-env-rdttxuu9/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
self.run_command(cmd)
File "/tmp/pip-build-env-rdttxuu9/overlay/lib/python3.11/site-packages/setuptools/dist.py", line 1234, in run_command
super().run_command(command)
File "/tmp/pip-build-env-rdttxuu9/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "/tmp/pip-build-env-rdttxuu9/overlay/lib/python3.11/site-packages/setuptools/command/egg_info.py", line 314, in run
self.find_sources()
File "/tmp/pip-build-env-rdttxuu9/overlay/lib/python3.11/site-packages/setuptools/command/egg_info.py", line 322, in find_sources
mm.run()
File "/tmp/pip-build-env-rdttxuu9/overlay/lib/python3.11/site-packages/setuptools/command/egg_info.py", line 551, in run
self.add_defaults()
File "/tmp/pip-build-env-rdttxuu9/overlay/lib/python3.11/site-packages/setuptools/command/egg_info.py", line 589, in add_defaults
sdist.add_defaults(self)
File "/tmp/pip-build-env-rdttxuu9/overlay/lib/python3.11/site-packages/setuptools/command/sdist.py", line 104, in add_defaults
super().add_defaults()
File "/tmp/pip-build-env-rdttxuu9/overlay/lib/python3.11/site-packages/setuptools/_distutils/command/sdist.py", line 251, in add_defaults
self._add_defaults_ext()
File "/tmp/pip-build-env-rdttxuu9/overlay/lib/python3.11/site-packages/setuptools/_distutils/command/sdist.py", line 336, in _add_defaults_ext
self.filelist.extend(build_ext.get_source_files())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<string>", line 204, in get_source_files
File "/tmp/pip-build-env-rdttxuu9/overlay/lib/python3.11/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.
This is also handled by the issue https://github.com/yaml/pyyaml/issues/724 and a bugfix-release is already available: https://pypi.org/project/PyYAML/6.0.1/ https://github.com/yaml/pyyaml/releases/tag/6.0.1
Because oci-cli sets following requirements the bugfix will not be used and installation process fails:
PyYAML>=5.4,<=6
This leads to a maximum version 6.0 of PyYAML.
Instead of setting PyYAML max. version to <=6 (which would not include any bugfix-releases), the requirement should be set to:
PyYAML>=5.4,~=6.0
or
PyYAML>=5.4,<6.1
Anyway the max. version needs at least to be set to 6.0.1 for getting the dependency issue between PyYAML and Cython 3.0.0 fixed.
Thanks to @alfredkrohmer the PR https://github.com/oracle/oci-cli/pull/695 could also fix this.
Do anyone form the ora-team look in to this?
And I would suggest to implement a workflow for installation oci-cli by requirements.txt on multiple platforms.
GitHub already support to Ubuntu runner. So an Ubuntu installation could be tested.
There already to news releases after this issue and solving pr has been created.
That's not a big change switching PyYAML from <=6 to <6.1 or ~=6.0
So why is this still not fixed?
Seems to work and nothing new happend here. So I close for now.