Closed richardforth closed 2 years ago
upgraded to python 3.8 on amazon liinux but the distro package is still missing
its there on Ubuntu 20.04
$ python3
Python 3.8.10 (default, Nov 26 2021, 20:14:08)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import distro
>>> distro.linux_distribution()
('Ubuntu', '20.04', 'focal')
>>>
https://distro.readthedocs.io/en/latest/
Lists "Amazon" as AmazonLinux
Yet the python-distro package is not available, and its not built in, I could try pip next?
Well at least on ubuntu, pip knows about distro, so it might be an option.
On Ubuntu
$ pip install distro
Requirement already satisfied: distro in /usr/lib/python3/dist-packages (1.4.0)
... Collecting distro Downloading distro-1.7.0-py3-none-any.whl (20 kB) Installing collected packages: distro Successfully installed distro-1.7.0
Closed, tests passing with deprecation warnings
[ !! ] Python scripting failed. Python requires package 'distro' or 'platform' to determine the Operating System and Version.
--
bash-4.2# python3 Python 3.7.10 (default, Jun 3 2021, 00:02:01) [GCC 7.3.1 20180712 (Red Hat 7.3.1-13)] on linux Type "help", "copyright", "credits" or "license" for more information.