Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using Nisaba via Pynini: cannot find rules_python #31

Closed
ryskina opened this issue May 26, 2021 · 4 comments
Closed

Using Nisaba via Pynini: cannot find rules_python #31

ryskina opened this issue May 26, 2021 · 4 comments
Labels
documentation Improvements or additions to documentation

Comments

@ryskina
Copy link

ryskina commented May 26, 2021

Hello,

I followed the installation instructions in the README to install and build Nisaba on my personal MacOS machine. Bazel is working and the small unit tests are passing.

However, when I try to use Nisaba FSTs in Pynini following the examples here, imports from rules_python fail. I am getting the same error with both the Anaconda Python 3.7 and the system Python 2.7.

Is there some further disconnect between my Python and Bazel, or am I maybe missing a step here? Thanks!

@agutkin
Copy link
Collaborator

agutkin commented May 26, 2021

I presume you are not using Bazel to build your code?

@agutkin
Copy link
Collaborator

agutkin commented May 26, 2021

In case the answer to the above question is yes then I presume you can try to simply copy run_files.py into your code and use as is. It is a helper library that has no Bazel internal dependencies.

@agutkin
Copy link
Collaborator

agutkin commented May 26, 2021

... and the easiest option - simply ignore the run_files Bazel API (if you are not using Bazel). After all, all you need is a FAR file which can be simply copied from the bazel-bin directory where it is generated. The reason the run_files API is there is to facilitate running as part of the Bazel ecosystem, which I suppose is unnecessary if you are not using it.

@ryskina
Copy link
Author

ryskina commented May 27, 2021

Thank you for the reply! You're right, I was not building my code with Bazel.

Removing run_files and manually appending the path to bazel-bin to the FAR filename worked, thank you!

@ryskina ryskina closed this as completed May 27, 2021
@agutkin agutkin added the documentation Improvements or additions to documentation label May 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants