fboender / ansible-cmdb

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

Cannot use `pipsi install ansible-cmdb` #190

Open mgedmin opened 5 years ago

mgedmin commented 5 years ago

pipsi is a tool that creates virtualenvs and symlinks tools into your PATH. E.g.

pipsi install ansible-cmdb

is roughly equivalent to

virtualenv ~/.local/venvs/ansible-cmdb
~/.local/venvs/ansible-cmdb/bin/pip install ansible-cmdb
ln -s ~/.local/venvs/ansible-cmdb/bin/ansible-cmdb ~/.local/bin/ansible-cmdb

Unfortunately this breaks ansible-cmdb's wrapper script:

$ which ansible-cmdb
/home/mg/.local/bin/ansible-cmdb

$ ansible-cmdb --help
Couldn't find /home/mg/.local/bin/ansible-cmdb.py in . or /home/mg/.local/bin/../lib/ansible-cmdb/ or /home/mg/.local/bin/../lib/ansiblecmdb/ (cwd=/home/mg)
fboender commented 5 years ago

Hey Marius,

Sorry for the late reply. I've been quite busy. I'll review the pull request soon (looks good at first sight) and apply it if it doesn't break any of the other distribution methods.

mgedmin commented 4 years ago

The same problem happens if I try to use pipx install ansible-cmd. (pipx is a pipsi replacement, since pipsi is no longer maintained.)

DevEvangit commented 4 years ago

Have the same problem. Traceback (most recent call last): File "/bin/../lib/ansiblecmdb/ansible-cmdb.py", line 19, in from mako import exceptions when i'm running command: ansible-cmdb -t html_fancy_split -p local_js=1 out / Errors from PIP installer: Traceback (most recent call last): File "/bin/pip3", line 7, in from pip._internal.cli.main import main File "/usr/lib/python3.4/site-packages/pip/_internal/cli/main.py", line 10, in from pip._internal.cli.autocompletion import autocomplete File "/usr/lib/python3.4/site-packages/pip/_internal/cli/autocompletion.py", line 9, in from pip._internal.cli.main_parser import create_main_parser File "/usr/lib/python3.4/site-packages/pip/_internal/cli/main_parser.py", line 7, in from pip._internal.cli import cmdoptions File "/usr/lib/python3.4/site-packages/pip/_internal/cli/cmdoptions.py", line 28, in from pip._internal.models.target_python import TargetPython File "/usr/lib/python3.4/site-packages/pip/_internal/models/target_python.py", line 4, in from pip._internal.utils.misc import normalize_version_info File "/usr/lib/python3.4/site-packages/pip/_internal/utils/misc.py", line 20, in from pip._vendor import pkg_resources File "/usr/lib/python3.4/site-packages/pip/_vendor/pkg_resources/init.py", line 92, in raise RuntimeError("Python 3.5 or later is required") RuntimeError: Python 3.5 or later is required Errors:

uninstall python and reinstall it again. ?? it did not work.

Any ideers for solution?

fboender commented 2 years ago

Hm, I got a comment notification via email from Romain Lalaut:

FYI the problem has been fixed with the version 1.31 I was using the workaround proposed by mgedmin (thanks!) but I no longer have to use it.

But I don't see that comment here? I'm going to close this issue in the assumption that this is fixed. I'll be merging mgeadmin's setuptools entry point PR pretty soon, which should get rid of these problems once and for all.

voondo commented 2 years ago

Hi, I thought the problem was fixed but it was not. Thus I removed my comment but didn't think about the notifications. Sorry about the confusion...

fboender commented 2 years ago

No worries. I'm reopening this issue.

gdevenyi commented 7 months ago

Any progress here? Still a bug as of today.

FrankVanDamme commented 6 months ago

Similarly


$ pipx run ansible-cmdb

Traceback (most recent call last):
  File "/home/me/.local/pipx/.cache/a213a075564eaf4/bin/../lib/ansiblecmdb/ansible-cmdb.py", line 20, in <module>
    import ansiblecmdb
ModuleNotFoundError: No module named 'ansiblecmdb'