I would like to run a python script from another python script using subprocess.Popen(). When I try in my terminal python3 eclat_model.py -p -c raw_data_430.csv -C out-eclat_430.csv -m 100
everything works. But when I insert in the script.py following code:
import subprocess
subprocess.Popen(
"eclat_model.py -p -c raw_data_430.csv -C out-eclat_430.csv -m 100"
)
I got this error message:
Traceback (most recent call last):
File "run_eclat.py", line 68, in <module>
main()
File "run_eclat.py", line 46, in main
subprocess.Popen(
File "/usr/lib/python3.8/subprocess.py", line 858, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/lib/python3.8/subprocess.py", line 1704, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'eclat_model.py -p -c raw_data_430.csv -C out-eclat_430.csv -m 100'
How can I fix it please?