I tried to run an example in Python but I get an error: No module named pocketsphinx
Now I read in this forum that maybe the pythonpath is wrong so I tried PYTHON_PATH=/usr/local/lib/python3/site-packages/
But still get the same error No module named pocketsphinx.
Does somebody have an idee what went wrong.
I use the raspberry pi and sphinxbase and pocketsphinx in python.
Thanks
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You can explore the filesystem in /usr/local/lib to understand where pocketsphinx.so is installed. It might be slightly different path, for example python3.4 instead of simple python3.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I also looked in /usr/local/lib/python3.4/dist-packages but it is empty.
also looked in /usr/local/lib/python2.7/dist-sites and dist-packages and that is also empty
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I search the internet for python 2.7 examples for pocketsphinx but could not find anything.
Maybe someone knows where to find python 2.7 examples it is only for testing write now.
Thanks
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I tried to run an example in Python but I get an error: No module named pocketsphinx
Now I read in this forum that maybe the pythonpath is wrong so I tried PYTHON_PATH=/usr/local/lib/python3/site-packages/
But still get the same error No module named pocketsphinx.
Does somebody have an idee what went wrong.
I use the raspberry pi and sphinxbase and pocketsphinx in python.
Thanks
You can explore the filesystem in /usr/local/lib to understand where pocketsphinx.so is installed. It might be slightly different path, for example python3.4 instead of simple python3.
I also looked in /usr/local/lib/python3.4/dist-packages but it is empty.
also looked in /usr/local/lib/python2.7/dist-sites and dist-packages and that is also empty
You can check pocketsphinx installation log to see where it installs. Probably you forgot sudo in make install so it didn't install successfully.
Thanks for the reply.
I did not compile it but install it with sudo apt-get install
I use the raspberry pi
I found pocketsphinx.so it is in usr/lib/python2.7/dist-packages
I search the internet for python 2.7 examples for pocketsphinx but could not find anything.
Maybe someone knows where to find python 2.7 examples it is only for testing write now.
Thanks
Examples in our sources work both for python 2.7 and for python3:
https://github.com/cmusphinx/pocketsphinx/tree/master/swig/python/test