So I try to run docker-compose on Fedora 36 but any time I try it, it says this:
Traceback (most recent call last):
File "/usr/bin/docker-compose", line 33, in <module>
sys.exit(load_entry_point('docker-compose==1.29.2', 'console_scripts', 'docker-compose')())
File "/usr/bin/docker-compose", line 25, in importlib_load_entry_point
return next(matches).load()
File "/usr/lib64/python3.10/importlib/metadata/__init__.py", line 171, in load
module = import_module(match.group('module'))
File "/usr/lib64/python3.10/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 992, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 992, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1004, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'compose'`
`
I tried using pip install docker-compose but It didn’t help.
2
Answers
Seems a python missing module. Try to install "compose".
Or remove docker-compose from the system with pip and try to reinstall using the version supplied by the vendor
Also you can try to use docker-compose-plugin and use "docker compose" instead of "docker-compose". Try installing with package manager.
It should help. Tell me if helped.
For RPM-based distros, run:
Also, you will try to manually install with bin file: