Error importing Tensorflow
I pointed the directory of parser_eval and conll2tree to /home/pwmvx1289/.cache/bazel/_bazel_pwmvx1289/f1c99cb5624c89408f4ae4a44b3c0d38/execroot/syntaxnet/bazel-out/local-opt/bin/syntaxnet/ to solve issues like "line 55: bazel-bin/syntaxnet/conll2tree: No such file or directory"
Now I get this
~$ echo 'Bob brought the pizza to Alice.' | models/syntaxnet/syntaxnet/demo.sh
Traceback (most recent call last):
File "/home/pwmvx1289/.cache/bazel/_bazel_pwmvx1289/f1c99cb5624c89408f4ae4a44b3c0d38/execroot/syntaxnet/bazel-out/local-opt/bin/syntaxnet/parser_eval.runfiles/main/syntaxnet/parser_eval.py", line 23, in
Error importing tensorflow. Unless you are using bazel,
you should not try to import tensorflow from its source directory;
please exit the tensorflow source tree, and relaunch your python interpreter
from there.
Traceback (most recent call last):
File "/home/pwmvx1289/.cache/bazel/_bazel_pwmvx1289/f1c99cb5624c89408f4ae4a44b3c0d38/execroot/syntaxnet/bazel-out/local-opt/bin/syntaxnet/parser_eval.runfiles/main/syntaxnet/parser_eval.py", line 23, in
Error importing tensorflow. Unless you are using bazel,
you should not try to import tensorflow from its source directory;
please exit the tensorflow source tree, and relaunch your python interpreter
from there.
Traceback (most recent call last):
File "/home/pwmvx1289/.cache/bazel/_bazel_pwmvx1289/f1c99cb5624c89408f4ae4a44b3c0d38/execroot/syntaxnet/bazel-out/local-opt/bin/syntaxnet/conll2tree.runfiles/main/syntaxnet/conll2tree.py", line 21, in
Error importing tensorflow. Unless you are using bazel, you should not try to import tensorflow from its source directory; please exit the tensorflow source tree, and relaunch your python interpreter from there.
What platform are you running on?
@aselle Ubuntu 14.04.5 LTS
@wongalvis What version of TensorFlow are you using?
Also, can you describe exactly what you did when you said: "I pointed the directory of parser_eval and conll2tree to /home/pwmvx1289/.cache/bazel/_bazel_pwmvx1289/f1c99cb5624c89408f4ae4a44b3c0d38/execroot/syntaxnet/bazel-out/local-opt/bin/syntaxnet/ to solve issues like "line 55: bazel-bin/syntaxnet/conll2tree: No such file or directory"
That sounds like the root problem, but I'm not sure exactly what you did.
I cloned tensorflow @ 950db43
It's been a while and I forgot the exact steps I've taken and the respective output. But I do rmb I encountered two problems, the "No such file" and "Error importing TF". I cd to ~ to avoid "importing tensorflow from its source directory". After encountering the "No such file" problem, I googled and found someone posting a solution by correcting the directories to conll2tree and parser_eval to /home/pwmvx1289/.cache/bazel/_bazel_pwmvx1289/f1c99cb5624c89408f4ae4a44b3c0d38/execroot/syntaxnet/bazel-out/local-opt/bin/syntaxnet/ where they exist.
Thank you.
@wongalvis Are you still encountering a problem? If not I'll close this out, and you can file a new issue when you're trying things out again.
Yes this problem persists, correcting the directories is what I've done before encountering "Error importing TF" even if I'm in ~/
I pointed the directory of parser_eval and conll2tree to /home/pwmvx1289/.cache/bazel/_bazel_pwmvx1289/f1c99cb5624c89408f4ae4a44b3c0d38/execroot/syntaxnet/bazel-out/local-opt/bin/syntaxnet/ to solve issues like "line 55: bazel-bin/syntaxnet/conll2tree: No such file or directory"
Could you please explain why you are doing this? (It seems very strange to me that you should need to be pointing any program at a bazel build cache rather than a bazel-bin directory)
I'm guessing that you're following this tutorial? https://github.com/tensorflow/models/tree/master/syntaxnet#installation ...but I don't see any steps including the binaries you mention
It gave error like "line 55: bazel-bin/syntaxnet/conll2tree: No such file or directory" when I'm running the demo script.
@calberti Could you please add some information about how these tools binraies are expected to be found by the scripts?
Automatically closing due to lack of recent activity. Since this issue is old at this point, please reopen the issue if it still occurs when tried with the latest version of Tensorflow. Thank you.