Skip to content

Commit 52baea5

Browse files
authored
Update syntaxnet_setup_for_osx.md
1 parent eb8d371 commit 52baea5

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

syntaxnet_setup_for_osx.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ cd <LOCATION_TO_WHERE_SYNTAXNET_REPO_IS_COPIED>/models/research/syntaxnet/tensor
5454
cd <LOCATION_TO_WHERE_SYNTAXNET_REPO_IS_COPIED>
5555
run “bazel test --linkopt=-headerpad_max_install_names dragnn/... syntaxnet/... util/utf8/…”
5656
```
57+
All the tests should pass with the above command and it will create bazel-bin directory in `<LOCATION_TO_WHERE_SYNTAXNET_REPO_IS_COPIED>/models/research/syntaxnet/bazel-bin`. This is the bin folder using which we'll package syntaxnet as module and install it. Before that, let's test the installation.
5758
9. Test Syntaxnet:
5859
```markdown
5960
cd <LOCATION_TO_WHERE_SYNTAXNET_REPO_IS_COPIED>/models/research/syntaxnet
@@ -63,3 +64,30 @@ echo 'Bob brought the pizza to Alice.' | syntaxnet/demo.sh
6364

6465

6566
![image](https://user-images.githubusercontent.com/22542670/38160793-93ae9d1c-34e0-11e8-813d-56298256858d.png)
67+
68+
11. Bundle syntaxnet package in `.whl packaging` format.
69+
```markdown
70+
mkdir /tmp/syntaxnet_pkg
71+
cd <LOCATION_TO_WHERE_SYNTAXNET_REPO_IS_COPIED>/models/research/syntaxnet
72+
bazel-bin/dragnn/tools/build_pip_package --output-dir=/tmp/syntaxnet_pkg
73+
**Output:** Wrote /tmp/syntaxnet_pkg/syntaxnet-0.2-cp27-cp27m-macosx_10_6_intel.whl
74+
```
75+
12. Install syntaxnet module:
76+
```markdown
77+
sudo pip install /tmp/syntaxnet_pkg/syntaxnet-0.2-cp27-cp27m-macosx_10_6_intel.whl
78+
```
79+
### Output: Successfully installed syntaxnet-0.2
80+
## Verification
81+
###### Open up python shell and check that the following imports work fine
82+
```markdown
83+
python
84+
from syntaxnet import sentence_pb2
85+
from syntaxnet import graph_builder
86+
from syntaxnet import structured_graph_builder
87+
from syntaxnet.ops import load_parser_ops
88+
from syntaxnet.ops import gen_parser_ops
89+
from syntaxnet import task_spec_pb2
90+
```
91+
92+
There were a bunch of errors I faced before I could reach this final point of successful installation with imports working in python shell. I've listed the issues that i faced `here` and how i went about fixing them here. Hope that saves some time for you :)
93+

0 commit comments

Comments
 (0)