No such file or directory: 'docker-compose'

Hello, I’m trying to install kobo in my computer to make some changes in the code and prepare it for a project. I tried to install it on my computer but then it get crashed so I’m installing it again. When I run run.py this is the problem that appears to me.

kobo-install/run.py
╔════════════════════════════════════════════════════════════════════╗
║ ║
║ WARNING! ║
║ ║
║ Existing environment files are detected. Files will be ║
║ overwritten. ║
║ ║
╚════════════════════════════════════════════════════════════════════╝
Do you want to continue?
1) Yes
2) No
[2]: 1
╔════════════════════════════════════════════════════════════════════╗
║ ║
║ Privileges escalation is required to update your /etc/hosts. ║
║ ║
╚════════════════════════════════════════════════════════════════════╝
Do you want to review your /etc/hosts file before overwriting it?
1) Yes
2) No
[1]: 2
Password:
Traceback (most recent call last):
File “/Users/santiagotamariz-martelmarco/Desktop/DaToolProyect/kobo-install/run.py”, line 107, in
run()
File “/Users/santiagotamariz-martelmarco/Desktop/DaToolProyect/kobo-install/run.py”, line 44, in run
Command.start()
File “/Users/santiagotamariz-martelmarco/Desktop/DaToolProyect/kobo-install/helpers/command.py”, line 305, in start
cls.stop(output=False, frontend_only=frontend_only)
File “/Users/santiagotamariz-martelmarco/Desktop/DaToolProyect/kobo-install/helpers/command.py”, line 420, in stop
CLI.run_command(maintenance_down_command,
File “/Users/santiagotamariz-martelmarco/Desktop/DaToolProyect/kobo-install/helpers/cli.py”, line 150, in run_command
stdout = subprocess.check_output(command,
File “/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/subprocess.py”, line 411, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File “/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/subprocess.py”, line 489, in run
with Popen(*popenargs, **kwargs) as process:
File “/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/subprocess.py”, line 854, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File “/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/subprocess.py”, line 1702, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: ‘docker-compose’
santiagotamariz-martelmarco@Santiagos-MacBook-Pro kobo-install % /usr/bin/python3 /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/subprocess.py
santiagotamariz-martelmarco@Santiagos-MacBook-Pro kobo-install % /usr/bin/python3 /Users/santiagotamariz-martelmarco/Desktop/DaToolProyect/kobo-install/run.py
Traceback (most recent call last):
File “/Users/santiagotamariz-martelmarco/Desktop/DaToolProyect/kobo-install/run.py”, line 107, in
run()
File “/Users/santiagotamariz-martelmarco/Desktop/DaToolProyect/kobo-install/run.py”, line 44, in run
Command.start()
File “/Users/santiagotamariz-martelmarco/Desktop/DaToolProyect/kobo-install/helpers/command.py”, line 305, in start
cls.stop(output=False, frontend_only=frontend_only)
File “/Users/santiagotamariz-martelmarco/Desktop/DaToolProyect/kobo-install/helpers/command.py”, line 420, in stop
CLI.run_command(maintenance_down_command,
File “/Users/santiagotamariz-martelmarco/Desktop/DaToolProyect/kobo-install/helpers/cli.py”, line 150, in run_command
stdout = subprocess.check_output(command,
File “/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/subprocess.py”, line 411, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File “/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/subprocess.py”, line 489, in run
with Popen(*popenargs, **kwargs) as process:
File “/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/subprocess.py”, line 854, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File “/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/subprocess.py”, line 1702, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: ‘docker-compose’
santiagotamariz-martelmarco@Santiagos-MacBook-Pro kobo-install %

When you open a file with the name “filename.ext”; you are telling the open() function that your file is in the current working directory . This is called a relative path.

file = open('filename.ext') //relative path

In the above code, you are not giving the full path to a file to the open() function, just its name - a relative path. The error “FileNotFoundError: [Errno 2] No such file or directory” is telling you that there is no file of that name in the working directory. So, try using the exact, or absolute path.

file = open(r'C:\path\to\your\filename.ext') //absolute path

In the above code, all of the information needed to locate the file is contained in the path string - absolute path.