Skip to content

Fixed Path to Sequitur Executable #3932

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

Closed

Conversation

Kadle11
Copy link

@Kadle11 Kadle11 commented Feb 16, 2020

While working on VoxForge, I found that the path for sequitur executable is not $SEQUITUR/bin, It is $SEQUITUR.

@Kadle11
Copy link
Author

Kadle11 commented Feb 16, 2020

Please let me know if I have done something wrong.

@danpovey
Copy link
Contributor

@jtrmal can you merge this?

@jtrmal
Copy link
Contributor

jtrmal commented Feb 17, 2020 via email

@jtrmal
Copy link
Contributor

jtrmal commented Feb 19, 2020

Hi, I just verified on two system that the binary is installed into ${SEQUITUR}/bin...
Could you show us your log from the install?

@Kadle11
Copy link
Author

Kadle11 commented Feb 19, 2020

I initially got this error while installing sequitur on CentOS 7:

You are attempting to install a package to a directory that is not 
on PYTHONPATH and which Python does not read ".pth" files from.

I followed the instructions from the following link:
sequitur-g2p/sequitur-g2p#14 (comment)

Installation - Standard Output Log

Already up-to-date.
python setup.py build
running build
running build_ext
running build_py
running build_scripts
/homes/rs/.local/lib/python2.7/site-packages
running install
running bdist_egg
running egg_info
creating sequitur_g2p.egg-info
writing requirements to sequitur_g2p.egg-info/requires.txt
writing sequitur_g2p.egg-info/PKG-INFO
writing top-level names to sequitur_g2p.egg-info/top_level.txt
writing dependency_links to sequitur_g2p.egg-info/dependency_links.txt
writing manifest file 'sequitur_g2p.egg-info/SOURCES.txt'
reading manifest file 'sequitur_g2p.egg-info/SOURCES.txt'
writing manifest file 'sequitur_g2p.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
running build_ext
creating build/bdist.linux-x86_64
creating build/bdist.linux-x86_64/egg
copying build/lib.linux-x86_64-2.7/_sequitur_.so -> build/bdist.linux-x86_64/egg
copying build/lib.linux-x86_64-2.7/Evaluation.py -> build/bdist.linux-x86_64/egg
copying build/lib.linux-x86_64-2.7/Minimization.py -> build/bdist.linux-x86_64/egg
copying build/lib.linux-x86_64-2.7/SequenceModel.py -> build/bdist.linux-x86_64/egg
copying build/lib.linux-x86_64-2.7/SequiturTool.py -> build/bdist.linux-x86_64/egg
copying build/lib.linux-x86_64-2.7/g2p.py -> build/bdist.linux-x86_64/egg
copying build/lib.linux-x86_64-2.7/misc.py -> build/bdist.linux-x86_64/egg
copying build/lib.linux-x86_64-2.7/sequitur.py -> build/bdist.linux-x86_64/egg
copying build/lib.linux-x86_64-2.7/sequitur_.py -> build/bdist.linux-x86_64/egg
copying build/lib.linux-x86_64-2.7/symbols.py -> build/bdist.linux-x86_64/egg
copying build/lib.linux-x86_64-2.7/tool.py -> build/bdist.linux-x86_64/egg
byte-compiling build/bdist.linux-x86_64/egg/Evaluation.py to Evaluation.pyc
byte-compiling build/bdist.linux-x86_64/egg/Minimization.py to Minimization.pyc
byte-compiling build/bdist.linux-x86_64/egg/SequenceModel.py to SequenceModel.pyc
byte-compiling build/bdist.linux-x86_64/egg/SequiturTool.py to SequiturTool.pyc
byte-compiling build/bdist.linux-x86_64/egg/g2p.py to g2p.pyc
byte-compiling build/bdist.linux-x86_64/egg/misc.py to misc.pyc
byte-compiling build/bdist.linux-x86_64/egg/sequitur.py to sequitur.pyc
byte-compiling build/bdist.linux-x86_64/egg/sequitur_.py to sequitur_.pyc
byte-compiling build/bdist.linux-x86_64/egg/symbols.py to symbols.pyc
byte-compiling build/bdist.linux-x86_64/egg/tool.py to tool.pyc
creating stub loader for _sequitur_.so
byte-compiling build/bdist.linux-x86_64/egg/_sequitur_.py to _sequitur_.pyc
creating build/bdist.linux-x86_64/egg/EGG-INFO
installing scripts to build/bdist.linux-x86_64/egg/EGG-INFO/scripts
running install_scripts
running build_scripts
creating build/bdist.linux-x86_64/egg/EGG-INFO/scripts
copying build/scripts-2.7/g2p.py -> build/bdist.linux-x86_64/egg/EGG-INFO/scripts
changing mode of build/bdist.linux-x86_64/egg/EGG-INFO/scripts/g2p.py to 755
copying sequitur_g2p.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
copying sequitur_g2p.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying sequitur_g2p.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying sequitur_g2p.egg-info/requires.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying sequitur_g2p.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
writing build/bdist.linux-x86_64/egg/EGG-INFO/native_libs.txt
creating dist
creating 'dist/sequitur_g2p-1.0.1668.6-py2.7-linux-x86_64.egg' and adding 'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Creating /homes/rs/Kaldi_HW/kaldi/tools/sequitur-g2p/lib/python2.7/site-packages/site.py
Processing sequitur_g2p-1.0.1668.6-py2.7-linux-x86_64.egg
creating /homes/rs/Kaldi_HW/kaldi/tools/sequitur-g2p/lib/python2.7/site-packages/sequitur_g2p-1.0.1668.6-py2.7-linux-x86_64.egg
Extracting sequitur_g2p-1.0.1668.6-py2.7-linux-x86_64.egg to /homes/rs/Kaldi_HW/kaldi/tools/sequitur-g2p/lib/python2.7/site-packages
Adding sequitur-g2p 1.0.1668.6 to easy-install.pth file
Installing g2p.py script to /homes/rs/Kaldi_HW/kaldi/tools/sequitur-g2p/lib/python2.7/site-packages/bin

Installed /homes/rs/Kaldi_HW/kaldi/tools/sequitur-g2p/lib/python2.7/site-packages/sequitur_g2p-1.0.1668.6-py2.7-linux-x86_64.egg
Processing dependencies for sequitur-g2p==1.0.1668.6
Searching for six==1.12.0
Best match: six 1.12.0
Adding six 1.12.0 to easy-install.pth file

Using /usr/lib/python2.7/site-packages
Searching for numpy==1.16.4
Best match: numpy 1.16.4
Adding numpy 1.16.4 to easy-install.pth file
Installing f2py2 script to /homes/rs/Kaldi_HW/kaldi/tools/sequitur-g2p/lib/python2.7/site-packages/bin
Installing f2py script to /homes/rs/Kaldi_HW/kaldi/tools/sequitur-g2p/lib/python2.7/site-packages/bin
Installing f2py2.7 script to /homes/rs/Kaldi_HW/kaldi/tools/sequitur-g2p/lib/python2.7/site-packages/bin

Using /homes/rs/.local/lib/python2.7/site-packages
Finished processing dependencies for sequitur-g2p==1.0.1668.6

Installation - Standard Error Log

./extras/install_sequitur.sh: Updating the repository -- we will try to merge with local changes (if you have any)
USER SITE: SEQUITUR_PACKAGE: lib/python2.7/site-packages
SEQUITUR: /homes/rs/Kaldi_HW/kaldi/tools/sequitur-g2p/lib/python2.7/site-packages
PYTHONPATH: 
zip_safe flag not set; analyzing archive contents...
sequitur_: module references __file__
Installation of SEQUITUR finished successfully
Please source tools/env.sh in your path.sh to enable it

There is no directory named sequitur-g2p/bin in kaldi/tools/

@jtrmal
Copy link
Contributor

jtrmal commented Feb 19, 2020

It says:

Installing g2p.py script to /homes/rs/Kaldi_HW/kaldi/tools/sequitur-g2p/lib/python2.7/site-packages/bin

So I think your change addresses something after your tweaks, but in general, it wouldn't be correct.
Thanks for your time spent on it, but I think I'll close this.

@jtrmal jtrmal closed this Feb 19, 2020
@jtrmal jtrmal reopened this Feb 19, 2020
@jtrmal
Copy link
Contributor

jtrmal commented Feb 19, 2020

Actually, I'm trying to figure out a more robust way how to install sequitur... Could you check out the original script (without your changes) and apply this simple diff?

-PYTHONPATH=${PYTHONPATH:-}:$SEQUITUR python setup.py install --prefix `pwd`
+PYTHONPATH=${PYTHONPATH:-}:$SEQUITUR PYTHONUSERBASE=$(pwd) python setup.py install --user --prefix=

Thanks!

@Kadle11
Copy link
Author

Kadle11 commented Feb 19, 2020

Sorry about not spotting that change.
Thanks for your time.

And Yes, Will check out the script with the diff and let you know.

@Kadle11
Copy link
Author

Kadle11 commented Feb 20, 2020

Hi @jtrmal
The diff you suggested worked, Thank you.

I had to change requirements.txt to not use the latest version of numpy (I used 1.16.4).
Using the latest version of numpy (1.18.1) was throwing an error because of something similar to the following link:
https://stackoverflow.com/questions/57734032/installing-numpy-scipy-in-python-2-7-now-fails-with-runtimeerror-python-vers

Check if it is the same with the rest of the systems or if numpy 1.18.1 will work with other systems.

@jtrmal
Copy link
Contributor

jtrmal commented Feb 20, 2020 via email

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

Successfully merging this pull request may close these issues.

3 participants