galeone / dynamic-training-bench

Simplify the training and tuning of Tensorflow models
Mozilla Public License 2.0
213 stars 31 forks source link

invalid syntax error #8

Closed JustWon closed 7 years ago

JustWon commented 7 years ago

When I try to execute dytb_train, I encounter this error message.. Among them, I think the last error may cause the problem.. Could you give me a clue to solve this problem?

Traceback (most recent call last): File "/usr/local/bin/dytb_train", line 4, in import('pkg_resources').run_script('dytb==0.4.4', 'dytb_train') File "/usr/local/lib/python2.7/dist-packages/pkg_resources/init.py", line 738, in run_script self.require(requires)[0].run_script(script_name, ns) File "/usr/local/lib/python2.7/dist-packages/pkg_resources/init.py", line 1498, in run_script code = compile(source, script_filename, 'exec') File "/usr/local/lib/python2.7/dist-packages/dytb-0.4.4-py2.7.egg/EGG-INFO/scripts/dytb_train", line 58 row = {**info["stats"], "path": info["paths"]["best"], "time": time.strftime("%Y-%m-%d %H:%M")} ^ SyntaxError: invalid syntax

galeone commented 7 years ago

The problem is that dytb_train (and dytb_evaluate) use the path #!/usr/bin/env python that fallback to the default python interpreter that almost everywhere (except on Archlinux) is a symlink to python2.

I'm going to change the interpreter invocation line ti #!/usr/bin/env python3 that should work fine in every environment (where python3.x is installed, of corse).

galeone commented 7 years ago

Ok, done. Upgrade your local installation with pip install --upgrade dytb and everything should work fine.