Install the SyntaxNet and DRAGNN Python modules fails on macOS
After successful execution of:
bazel test --linkopt=-headerpad_max_install_names
dragnn/... syntaxnet/... util/utf8/...
I try to build python modules: bazel-bin/dragnn/tools/build_pip_package --output-dir=/tmp/syntaxnet_pkg
Got following error:
cp: illegal option -- -
usage: cp [-R [-H | -L | -P]] [-fi | -n] [-apvX] source_file target_file
cp [-R [-H | -L | -P]] [-fi | -n] [-apvX] source_file ... target_directory
Traceback (most recent call last):
File "/Users/kiril/Workspace/ml/models/syntaxnet/bazel-bin/dragnn/tools/build_pip_package.runfiles/main/dragnn/tools/build_pip_package.py", line 86, in
The problem is in file: https://github.com/tensorflow/models/blob/master/syntaxnet/dragnn/tools/build_pip_package.py
MacOs doesn't support --no-preserve=all argument.
I got the same issue
Hi,
As a quick fix, you can try dropping no-preserve=all, or using 'gcp' instead of 'cp' (having first installed coreutils via 'brew install coreutils').
Exactly that I did.
After I did that, I was able to build but when I tried python tutorial_1.py i got this error:
Traceback (most recent call last):
File "tutorial_1.py", line 11, in <module>
from dragnn.python import graph_builder
File "/Users/minhtuev/workspace/dep-parser/venv/lib/python2.7/site-packages/dragnn/python/graph_builder.py", line 30, in <module>
tf.NotDifferentiable('ExtractFixedFeatures')
AttributeError: 'module' object has no attribute 'NotDifferentiable'
@minhtuev Seems like you may have an outdated TensorFlow version installed. Can you try updating to 1.0 or 1.1 released and checking again?
I cloned master today and I also have this issue on Mac
The flag --no-preserve=all is not available on mac. I removed it and it worked
Now I ran into this issue:
Traceback (most recent call last):
File "tutorial_1.py", line 17, in <module>
import dragnn.python.load_dragnn_cc_impl
File "/Users/minhtuev/workspace/dep-parser/venv/lib/python2.7/site-packages/dragnn/python/load_dragnn_cc_impl.py", line 22, in <module>
os.path.join(tf.resource_loader.get_data_files_path(), 'dragnn_cc_impl.so'))
File "/Users/minhtuev/workspace/dep-parser/venv/lib/python2.7/site-packages/tensorflow/python/framework/load_library.py", line 64, in load_op_library
None, None, error_msg, error_code)
tensorflow.python.framework.errors_impl.NotFoundError: dlopen(/Users/minhtuev/workspace/dep-parser/venv/lib/python2.7/site-packages/dragnn/python/dragnn_cc_impl.so, 6): Symbol not found: __ZN10tensorflow24TfCheckOpHelperOutOfLineERKNS_6StatusEPKc
Referenced from: /Users/minhtuev/workspace/dep-parser/venv/lib/python2.7/site-packages/dragnn/python/dragnn_cc_impl.so
Expected in: flat namespace
in /Users/minhtuev/workspace/dep-parser/venv/lib/python2.7/site-packages/dragnn/python/dragnn_cc_impl.so
same issue +1
remove --no-preserve=all
/Users/mac/NLP/models/syntaxnet/dragnn/tools/build_pip_package.py
it works ! thank you all !
We have removed --no-preserve=all at head, so this issue should not recur.