Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot use pipsi install ansible-cmdb #190

Open
mgedmin opened this issue Jan 23, 2019 · 8 comments · May be fixed by #191
Open

Cannot use pipsi install ansible-cmdb #190

mgedmin opened this issue Jan 23, 2019 · 8 comments · May be fixed by #191

Comments

@mgedmin
Copy link

mgedmin commented Jan 23, 2019

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)
mgedmin added a commit to mgedmin/ansible-cmdb that referenced this issue Jan 23, 2019
Should fix fboender#190 and related issues (e.g. the script will not work
correctly ansible-cmdb if it's been installed into a non-activated
virtualenv).
@fboender
Copy link
Owner

fboender commented Mar 6, 2019

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
Copy link
Author

mgedmin commented Aug 10, 2019

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
Copy link

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?

mgedmin added a commit to mgedmin/ansible-cmdb that referenced this issue Nov 5, 2020
Should fix fboender#190 and related issues (e.g. the script will not work
correctly ansible-cmdb if it's been installed into a non-activated
virtualenv).
mgedmin added a commit to mgedmin/ansible-cmdb that referenced this issue Jun 8, 2021
Should fix fboender#190 and related issues (e.g. the script will not work
correctly ansible-cmdb if it's been installed into a non-activated
virtualenv).
@fboender
Copy link
Owner

fboender commented Sep 5, 2021

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.

@fboender fboender closed this as completed Sep 5, 2021
@voondo
Copy link

voondo commented Sep 6, 2021

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
Copy link
Owner

fboender commented Sep 6, 2021

No worries. I'm reopening this issue.

@fboender fboender reopened this Sep 6, 2021
@gdevenyi
Copy link

Any progress here? Still a bug as of today.

@FrankVanDamme
Copy link

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'

mgedmin added a commit to mgedmin/ansible-cmdb that referenced this issue Sep 10, 2024
Should fix fboender#190 and related issues (e.g. the script will not work
correctly ansible-cmdb if it's been installed into a non-activated
virtualenv).
mgedmin added a commit to mgedmin/ansible-cmdb that referenced this issue Sep 10, 2024
Should fix fboender#190 and related issues (e.g. the script will not work
correctly ansible-cmdb if it's been installed into a non-activated
virtualenv).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants