python-mcparseface icon indicating copy to clipboard operation
python-mcparseface copied to clipboard

ImportError: cannot import name tf_logging

Open qinghua2016 opened this issue 8 years ago • 2 comments

I can successfuly run " bazel test --local_resources 2048,.5,1.0 --genrule_strategy=standalone syntaxnet/... util/utf8/..." with 17 tests pass. Also I succeed to run "echo 'Bob brought the pizza to Alice.' | syntaxnet/demo.sh". But when I run the command "python pyparseface.py "in terminal, it print as "I tensorflow/stream_executor/dso_loader.cc:105] successfully opened CUDA library libcublas.so locally I tensorflow/stream_executor/dso_loader.cc:99] Couldn't open CUDA library libcudnn.so. LD_LIBRARY_PATH: I tensorflow/stream_executor/cuda/cuda_dnn.cc:1562] Unable to load cuDNN DSO I tensorflow/stream_executor/dso_loader.cc:105] successfully opened CUDA library libcufft.so locally I tensorflow/stream_executor/dso_loader.cc:105] successfully opened CUDA library libcuda.so.1 locally I tensorflow/stream_executor/dso_loader.cc:105] successfully opened CUDA library libcurand.so locally Traceback (most recent call last): File "pyparseface.py", line 19, in from tensorflow.python.platform import tf_logging as logging ImportError: cannot import name tf_logging " it is actually that the python code also failed to do operations as follows: "from syntaxnet import sentence_pb2, structured_graph_builder from syntaxnet.ops import gen_parser_ops" Do you know why?

qinghua2016 avatar Sep 02 '16 03:09 qinghua2016

Hey @qinghua2016 thanks for filing a bug!

I made a change earlier today that might fix this issue. Can you pull the latest code and try again?

plowman avatar Sep 02 '16 04:09 plowman

I have successfully run your code. As the provider says, the models of syntaxnet can only work with the tensorfow in the models. The reason why I failed to run it is that I installed tensorflow before. After I remove tensorfolw, I can run it. But I need to use tensorflow for other things, I am wondering if you have any idea to use pip installed tensorflow for syntaxnet?

qinghua2016 avatar Sep 06 '16 09:09 qinghua2016