1

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.

3 Answers 3

0

For RPM-based distros, run:

sudo yum update
sudo yum install docker-compose-plugin

Also, you will try to manually install with bin file:

curl -SL https://github.com/docker/compose/releases/download/v2.15.1/docker-compose-linux-x86_64 -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
Sign up to request clarification or add additional context in comments.

2 Comments

Thank you so much but I tried it and it didn't help. So I tried rebooting the computer and now I got just Segmentation fault error when trying to run docker-compose. Don't you have an idea what could be the problem?
It's probably good to say that it crashes even when just checking a version
0

I simply migrated from docker-compose to docker compose (newer version: Difference between "docker compose" and "docker-compose") and everything started work well

Comments

-1

Seems a python missing module. Try to install "compose".

sudo pip install compose

Or remove docker-compose from the system with pip and try to reinstall using the version supplied by the vendor

sudo yum install docker-compose

Also you can try to use docker-compose-plugin and use "docker compose" instead of "docker-compose". Try installing with package manager.

sudo yum install docker-compose-plugin

It should help. Tell me if helped.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.