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.

molecule does not find docker within pipx venv

See original GitHub issue

Issue Type

  • Bug report

Molecule and Ansible details

pipx list
venvs are in /home/sgw/.local/pipx/venvs
apps are exposed on your $PATH at /home/sgw/.local/bin
   package ansible 2.9.2, Python 3.7.6
    - ansible
    - ansible-config
    - ansible-connection
    - ansible-console
    - ansible-doc
    - ansible-galaxy
    - ansible-inventory
    - ansible-playbook
    - ansible-pull
    - ansible-test
    - ansible-vault
   package debops 1.2.1, Python 3.7.6
    - debops
    - debops-defaults
    - debops-init
    - debops-padlock
    - debops-task
    - debops-update
   package docker 4.1.0, Python 3.7.6
    - chardetect
    - wsdump.py
   package molecule 2.22, Python 3.7.6
    - molecule

Molecule installation method (one of):

  • pipx

Ansible installation method (one of):

  • pipx

Detail any linters or test runners used:

Desired Behavior

molecule should correctly create/destroy/converge docker containers. It does so if I use my old python venv, but not with the environment created with pipx.

Actual Behaviour

molecule --debug destroy
--> Validating schema /home/sgw/projects/github/xyx/molecule/default/molecule.yml.
Validation completed successfully.
--> Validating schema /home/sgw/projects/github/xyx/molecule/travis/molecule.yml.
Validation completed successfully.
--> Test matrix
    
└── default
    ├── dependency
    ├── cleanup
    └── destroy
    
--> Scenario: 'default'
--> Action: 'dependency'
Skipping, missing the requirements file.
--> Scenario: 'default'
--> Action: 'cleanup'
Skipping, cleanup playbook not configured.
--> Scenario: 'default'
--> Action: 'destroy'
--> Sanity checks: 'docker'
ERROR: Missing Docker driver dependency. Please install via 'molecule[docker]' or refer to your INSTALL.rst driver documentation file

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
stefangweichingercommented, Jan 13, 2020

@zeitounator (oh, a climber pic … climber here as well 😉 )

I tried some inject commands and now it seems to work. I will start over to get a clean environment.

pipx list

does not list the injected packages, btw

But it seems OK now, thanks. This makes using topgrade even more useful

0reactions
hswong3icommented, Mar 3, 2021

Install Molecule could be done with pipx install and pipx inject, e.g.:

pipx install --include-deps flake8
pipx install --include-deps yamllint
pipx install --include-deps ansible
pipx inject --include-apps ansible ansible-lint
pipx inject --include-apps ansible molecule
pipx inject ansible docker
pipx inject ansible openshift
pipx inject ansible python-vagrant
pipx inject ansible netaddr
pipx inject ansible molecule-docker
pipx inject ansible molecule-podman
pipx inject ansible molecule-vagrant
Read more comments on GitHub >

github_iconTop Results From Across the Web

Installation — Molecule Documentation
Installation . This document assumes the developer has a basic understanding of python packaging, and how to install and manage python on...
Read more >
Troubleshooting - pipx
If you see pipx exhibiting strange behavior on install or upgrade, check that you don't have special environment variables that affect pip 's...
Read more >
molecule-docker - PyPI
Molecule Docker Plugin is designed to allow use docker containers for provisioning test resources. Please note that this driver is currently in its...
Read more >
What is the best way to manage Python so you don't break ...
pipx if I want to install and use a Python application (i.e. a command that I can run). tox when I'm doing proper...
Read more >
usr/local/bin/python3.10 /users/dhivya/desktop/thol ... - You.com
Assuming python3 is in /usr/bin/ if you don't know if it's located there, ... Then you can run the above command from within...
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