Registered Member
|
I see that simon uses python27, but it errors out in "C:/Program Files (x86)/Simon/bin/sphinxtrain.EXE". I have been trying to rewrite it because it has tab/space errors print errors (No parentheses). I have fixed most of them but this one has me stumped.
File "C:/Program Files (x86)/Simon/bin/sphinxtrain.EXE", line 110 elif command == "run": ^ SyntaxError: invalid syntax Here is the code so far:
I removed the line in question and get errors on the next else: statement if that helps any?. I am not a python programer so I don't have a clue what is wrong here. If someone could help me get this working I would be grateful. Dave |
Moderator
|
Print does not use parenthesis in Python 2. Is it possible you may have python3 installed, and this is getting picked up and used over Simon's Python 2.7?
Best regards, Peter |
Registered Member
|
That is what I think is going on. I do have python 3.x installed and in my path. How do i tell Simon not to use python 3.X. I have other apps that use 3.X and need it in the path.
Thanks for the reply. |
Moderator
|
Honestly, I don't know what the "proper" way to do this in Windows. On Linux, you just need to edit the shebang to read /usr/bin/python2 to prefer that. I'd google what to do on Windows.
Btw, have you tried simply reordering the python installations on your path such that python 2 would be first? Best regards, Peter |
Registered users: bartoloni, Bing [Bot], Google [Bot], Sogou [Bot], Yahoo [Bot]