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

Referencing Phonetisaurus within Python3 #56

Open
appeacock opened this issue Mar 6, 2020 · 1 comment
Open

Referencing Phonetisaurus within Python3 #56

appeacock opened this issue Mar 6, 2020 · 1 comment

Comments

@appeacock
Copy link

appeacock commented Mar 6, 2020

I installed successfully with Python3 bindings but unable to reference it within Python3. It installed in dist- and site-packages but I'm unable to properly import it within a Python3 script. Is this a bug with how it populates these directories or my implementation?

I installed it as follows:

$ git clone https://github.com/AdolfVonKleist/Phonetisaurus.git
$ cd Phonetisaurus
$ rm -rf python/pybindgen
$ sudo pip3 uninstall pybindgen
$ sudo pip3 install pybindgen
$ PYTHON=python3 ./configure --enable-python
$ make
$ sudo make install
$ cd python
$ cp ../.libs/Phonetisaurus.so .
$ sudo python3 setup.py install
$ cd

Folder contents:

$ ls /usr/local/lib/python3.7/dist-packages | grep 'phon\|Phon'
phonetisaurus-0.3-py3.7.egg
$ ls /usr/local/lib/python3.7/site-packages | grep 'phon\|Phon'
Phonetisaurus.a
Phonetisaurus.la
Phonetisaurus.so

Can also run the phonetisaurus at CLI:

$ phonetisaurus-align
GitRevision: kaldi-21-ge73a60
Loading input file:
Failed to open input file:
...
Traceback (most recent call last):
...
  File "/home/pi/jasper/client/vocabcompiler.py", line 23, in <module>
    import phonetisaurus
  File "/usr/local/lib/python3.7/dist-packages/phonetisaurus-0.3-py3.7.egg/phonetisaurus/__init__.py", line 1, in <module>
    from Phonetisaurus import PhonetisaurusScript as Phonetisaurus
ModuleNotFoundError: No module named 'Phonetisaurus'```
@Mic92
Copy link
Contributor

Mic92 commented Jun 6, 2020

It is weird that it installs static libraries to site-packages. Python cannot handle those.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants