[英]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)我正在尝试从 ubuntu 终端运行“py”文件(通过使用./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”脚本名称,所以它也会运行。
python3 run_dlc_filter_predictions.py
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.