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

ImportError: No module named 'sg_util' #5

Closed
fosskers opened this issue Nov 26, 2016 · 8 comments
Closed

ImportError: No module named 'sg_util' #5

fosskers opened this issue Nov 26, 2016 · 8 comments

Comments

@fosskers
Copy link

fosskers commented Nov 26, 2016

I've installed (as far as I know) the Python 3 version of all your dependencies, including Tensorflow.

When running recognize.py I get:

colin@yumi ~/c/h/e/speech-to-text-wavenet> python recognize.py --file carlin_disappointed.wav 
Traceback (most recent call last):
  File "recognize.py", line 2, in <module>
    import sugartensor as tf
  File "/usr/lib/python3.5/site-packages/sugartensor/__init__.py", line 5, in <module>
    from sg_util import sg_opt
ImportError: No module named 'sg_util'

sugartensor is definitely installed. Thoughts?

@buriburisuri
Copy link
Owner

Sorry. Python 3 is not supported not yet. Try 2.7 ver.

@fosskers
Copy link
Author

Alright, thanks. I'll let you know how it goes.

@fosskers
Copy link
Author

Almost...

Traceback (most recent call last):
  File "recognize.py", line 4, in <module>
    import librosa
  File "/usr/lib/python2.7/site-packages/librosa/__init__.py", line 18, in <module>
    from . import display
  File "/usr/lib/python2.7/site-packages/librosa/display.py", line 21, in <module>
    import matplotlib.pyplot as plt
  File "/usr/lib/python2.7/site-packages/matplotlib/pyplot.py", line 114, in <module>
    _backend_mod, new_figure_manager, draw_if_interactive, _show = pylab_setup()
  File "/usr/lib/python2.7/site-packages/matplotlib/backends/__init__.py", line 32, in pylab_setup
    globals(),locals(),[backend_name],0)
  File "/usr/lib/python2.7/site-packages/matplotlib/backends/backend_tkagg.py", line 6, in <module>
    from matplotlib.externals.six.moves import tkinter as Tk
  File "/usr/lib/python2.7/site-packages/matplotlib/externals/six.py", line 199, in load_module
    mod = mod._resolve()
  File "/usr/lib/python2.7/site-packages/matplotlib/externals/six.py", line 113, in _resolve
    return _import_module(self.mod)
  File "/usr/lib/python2.7/site-packages/matplotlib/externals/six.py", line 80, in _import_module
    __import__(name)
  File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 39, in <module>
    import _tkinter # If this fails your Python may not be configured for Tk
ImportError: libtk8.6.so: cannot open shared object file: No such file or directory

@buriburisuri
Copy link
Owner

I find that librosa requires matplotlib. Sorry but librosa is mandatory for this project and you need to install matplotlib. ( If you have problem with TKinter, then try in the global python env. not in the virtualenv)

@fosskers
Copy link
Author

Both are already installed actually, in the global environment.

@buriburisuri
Copy link
Owner

buriburisuri commented Nov 29, 2016

I think this is librosa library and your environment.

Please, refer issue #8 and http://stackoverflow.com/questions/5459444/tkinter-python-may-not-be-configured-for-tk

@fosskers
Copy link
Author

I'm on Arch Linux, and the solution was to install TK via: sudo pacman -S tk

@AlvinChen13
Copy link

For CentOS, if you encounter the following error, please do:

sudo yum install tk-devel tkinter

File "/usr/lib64/python2.7/site-packages/matplotlib/backends/init.py", line 32, in pylab_setup
globals(),locals(),[backend_name],0)
File "/usr/lib64/python2.7/site-packages/matplotlib/backends/backend_tkagg.py", line 6, in
from six.moves import tkinter as Tk
File "/usr/lib/python2.7/site-packages/six.py", line 203, in load_module
mod = mod._resolve()
File "/usr/lib/python2.7/site-packages/six.py", line 115, in _resolve
return _import_module(self.mod)
File "/usr/lib/python2.7/site-packages/six.py", line 82, in _import_module
import(name)
ImportError: No module named Tkinter

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

3 participants