I'm trying to run a "py" file from ubuntu terminal (by calling a script file with ./run_dlc_filter_predictions.py)
This line within the code is throwing a syntax error near unexpected token '(' - that I'm receiving in the terminal.
import pathlib
project_path = pathlib.Path(__file__).parent
Any idea how to fix it? The syntax seems perfectly fine to me. I spent hours trying to figure it out, and no idea. What could I possibly be missing?
#!/usr/bin/env python3as the first line or you need to call withpython3 ./run_dlc_filter_predictions.py. By default linux will try to execute a script using /bin/sh if you do not specify a shebang.