fboender / ansible-cmdb

Generate host overview from ansible fact gathering output
GNU General Public License v3.0
2.35k stars 467 forks source link

No suitable python version found (v2.7 or higher required). Aborting #245

Closed alansenairj closed 11 months ago

alansenairj commented 2 years ago

How can I put it to find python and then put it to work?

lpi@glpi:~/cmdb/out$ cat /etc/os-release PRETTY_NAME="Debian GNU/Linux 11 (bullseye)" NAME="Debian GNU/Linux" VERSION_ID="11" VERSION="11 (bullseye)" VERSION_CODENAME=bullseye ID=debian HOME_URL="https://www.debian.org/" SUPPORT_URL="https://www.debian.org/support" BUG_REPORT_URL="https://bugs.debian.org/"

glpi@glpi:~/cmdb/out$ python3 --version Python 3.9.2

glpi@glpi:~/cmdb/out$ ansible-cmdb out/ > index.html No suitable python version found (v2.7 or higher required). Aborting

glpi@glpi:~/cmdb/out$ sudo pip install --upgrade ansible-cmdb Requirement already satisfied: ansible-cmdb in /usr/local/lib/python3.9/dist-packages (1.31) Collecting ansible-cmdb Using cached ansible_cmdb-1.31-py2.py3-none-any.whl (355 kB) Downloading ansible-cmdb-1.30.tar.gz (179 kB) |████████████████████████████████| 179 kB 6.4 MB/s Requirement already satisfied: mako in /usr/local/lib/python3.9/dist-packages (from ansible-cmdb) (1.2.0) Requirement already satisfied: jsonxs in /usr/local/lib/python3.9/dist-packages (from ansible-cmdb) (0.6) Requirement already satisfied: ushlex in /usr/local/lib/python3.9/dist-packages (from ansible-cmdb) (0.99.1) Requirement already satisfied: pyyaml in /usr/lib/python3/dist-packages (from ansible-cmdb) (5.3.1) Requirement already satisfied: MarkupSafe>=0.9.2 in /usr/lib/python3/dist-packages (from mako->ansible-cmdb) (1.1.1)

wbh1 commented 2 years ago

Debian 11 does not automatically symlink /usr/bin/python3 to /usr/bin/python (see the note here).

You can either:

  1. Create the symlink yourself (not recommended).
  2. Edit the wrapper shell like https://github.com/fboender/ansible-cmdb/pull/240.
chicks-net commented 2 years ago

You might be able to solve this by installing the python-is-python3 package. https://packages.debian.org/unstable/python-is-python3

On Mon, May 16, 2022 at 9:03 AM Will Hegedus @.***> wrote:

Debian 11 does not automatically symlink /usr/bin/python3 to /usr/bin/python (see the note here https://wiki.debian.org/Python#Python_in_Debian).

You can either:

  1. Create the symlink yourself (not recommended).
  2. Edit the wrapper shell like #240 https://github.com/fboender/ansible-cmdb/pull/240.

— Reply to this email directly, view it on GitHub https://github.com/fboender/ansible-cmdb/issues/245#issuecomment-1127855592, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIMOWPT7QGA2QXBV42FOADVKJWW5ANCNFSM5THGD6YA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

-- Christopher Hicks ( he/him ) http://www.chicks.net/

YashAnand1 commented 11 months ago

Though its not recommended, you can try running the following command for creating the symlink yourself:

sudo ln -s /usr/bin/python3 /usr/bin/python

Study this for a better understanding:

Understanding the sn command Setting Python3 as Default

If you have fetched the host info, you should be able to get their CMDB HTML overview by running something like:

ansible-cmdb out/ > abcd.html 
alansenairj commented 11 months ago

You might be able to solve this by installing the python-is-python3 package. https://packages.debian.org/unstable/python-is-python3 On Mon, May 16, 2022 at 9:03 AM Will Hegedus @.> wrote: Debian 11 does not automatically symlink /usr/bin/python3 to /usr/bin/python (see the note here https://wiki.debian.org/Python#Python_in_Debian). You can either: 1. Create the symlink yourself (not recommended). 2. Edit the wrapper shell like #240 <#240>. — Reply to this email directly, view it on GitHub <#245 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIMOWPT7QGA2QXBV42FOADVKJWW5ANCNFSM5THGD6YA . You are receiving this because you are subscribed to this thread.Message ID: @.> -- Christopher Hicks ( he/him ) http://www.chicks.net/

This procedure solves my problem and it was so easy to do. Thank you!