question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

pipx install ansible - No binaries associated with this package.

See original GitHub issue

First off, thanks again for making pipx!

Installing Ansible with pipx fails with “no binaries associated with this package”.

Ansible is packaged in a fairly unique manner, as can be seen in the setup.py file and examining the bin folder. The main binary is ansible and other functionality such as ansible-playbook is a symlink to ansible.

I wouldn’t expect this to be a quick fix but I did want to note this in an issue.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

26reactions
pdecatcommented, Nov 14, 2022

For people coming here from Google like me, ansible 2.10+ now needs to be installed by pipx install ansible-base:

# pipx install ansible
Note: Dependent package 'ansible-base<2.11,>=2.10.1' contains 11 apps
  - ansible
  - ansible-config
  - ansible-connection
  - ansible-console
  - ansible-doc
  - ansible-galaxy
  - ansible-inventory
  - ansible-playbook
  - ansible-pull
  - ansible-test
  - ansible-vault

No apps associated with package ansible. Try again with '--include-deps' to include apps of dependent packages, which are listed above. If you are attempting to install a library, pipx should not be used. Consider using pip or a similar tool instead.
# pipx install ansible-base
  installed package ansible-base 2.10.2, Python 3.8.5
  These apps are now globally available
    - ansible
    - ansible-config
    - ansible-connection
    - ansible-console
    - ansible-doc
    - ansible-galaxy
    - ansible-inventory
    - ansible-playbook
    - ansible-pull
    - ansible-test
    - ansible-vault
done! ✨ 🌟 ✨

And if you need community modules and plugins which are now part of collections, you can then inject them:

# pipx inject ansible-base $module
  injected package $module into venv ansible-base
done! ✨ 🌟 ✨

Related: https://github.com/pipxproject/pipx/issues/504

Edit: fixed inject example

5reactions
alorencecommented, Nov 14, 2022

As an alternative, you can install ansible with option --include-deps to ensure binaries from dependent package (i.e. ansible-base) will be setup as globally available commands. This is a 1-line alternative to the solution provided by @pdecat

❯ pipx install --include-deps ansible
  installed package ansible 6.6.0, installed using Python 3.10.8
  These apps are now globally available
    - ansible
    - ansible-community
    - ansible-config
    - ansible-connection
    - ansible-console
    - ansible-doc
    - ansible-galaxy
    - ansible-inventory
    - ansible-playbook
    - ansible-pull
    - ansible-test
    - ansible-vault
done! ✨ 🌟 ✨

❯ ansible --version
ansible [core 2.13.6]
  config file = None
  configured module search path = ['/home/alorence/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/alorence/.local/pipx/venvs/ansible/lib/python3.10/site-packages/ansible
  ansible collection location = /home/alorence/.ansible/collections:/usr/share/ansible/collections
  executable location = /home/alorence/.local/bin/ansible
  python version = 3.10.8 (main, Oct 13 2022, 21:13:48) [GCC 12.2.0]
  jinja version = 3.1.2
  libyaml = True
Read more comments on GitHub >

github_iconTop Results From Across the Web

pipx install ansible - No binaries associated with this package.
Installing Ansible with pipx fails with "no binaries associated with this package". Ansible is packaged in a fairly unique manner, as can be ......
Read more >
community.general.pipx module - Ansible Documentation
community.general.pipx module – Manages applications installed with pipx ... This module is part of the community.general collection (version 6.1.0). You might ...
Read more >
Changelog - pipx - GitHub Pages
Fix encoding issue on Windows when pip fails to install a package ... from cleaning up linked binaries if the venv was old...
Read more >
pipx · PyPI
execute binaries from Python packages in isolated environments. ... Specify a version of Python to associate all installed packages with.
Read more >
Using pyenv, how can I pip install global CLIs and make them ...
The Python Packaging Authority has a tool called PipX which is meant for exactly this purpose, check it out! From the readme:.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found