Search code examples
pythondockermolecule

`pip install docker-py` vs `pip install 'molecule[docker]'`?


I have seen people using pip install docker-py or pip install 'molecule[docker]'.

I believe they are similar (equivalent?)

I read https://molecule.readthedocs.io/en/stable/getting-started.html which says :

Molecule requires an external Python dependency for the Docker driver which is provided when installing Molecule using pip install 'molecule[docker]'.

so is the molecule[docker] one better in some way ?


Solution

  • pip install molecule[docker] is special pip syntax to say "install the molecule package, with its additional docker option". Using this is almost certainly better than installing molecule with no additional options, and then trying to manually install its Docker dependencies separately.