简体   繁体   中英

syntax error near unexpected token `(' in ubuntu terminal

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?

If already installed, ya can call “python3” the script name, so it'll run too.

python3 run_dlc_filter_predictions.py

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM