Error on QSTK.qstkstudy on Python 2.7.3

299 Views Asked by At

I am trying to install QSTK on my python 2.7.3. (on windows 10). During the installation, it seemed there was no problem and I did not face any errors. However, when I run the validation.py (here) to check it seems that QSTK.qstkstudu cannot be imported. Here is the error that I get while running validation.py:

QSTK is installed and can be imported

[...]

QSTK.qstkutil is installed and can be imported

File "C:\Python27\lib\site.py", line 372, in __call__

raise SystemExit(code)

SystemExit: Error : QSTK.qstkstudy can not be imported.

Does anyone have a clue what should I do?

1

There are 1 best solutions below

0
On

The line in Validation.py which produces the error is:

import QSTK.qstkstudy.EventProfiler  

If you try it directly in python, you can see what is missing. In my case it was tkinter.

>>> import QSTK.qstkstudy.EventProfiler  
Traceback (most recent call last):  
  File "<stdin>", line 1, in <module>  
  File "/usr/local/lib/python2.7/dist-packages/QSTK-0.2.8-py2.7.egg/QSTK/qstkstudy/EventProfiler.py", line 16, in <module>  
    import matplotlib.pyplot as plt  
  File "/usr/lib/python2.7/dist-packages/matplotlib/pyplot.py", line 114, in <module>  
_backend_mod, new_figure_manager, draw_if_interactive, _show = pylab_setup()  
  File "/usr/lib/python2.7/dist-packages/matplotlib/backends/__init__.py", line 32, in pylab_setup  
globals(),locals(),[backend_name],0)  
  File "/usr/lib/python2.7/dist-packages/matplotlib/backends/backend_tkagg.py", line 6, in <module>  
from matplotlib.externals.six.moves import tkinter as Tk  
  File "/usr/lib/python2.7/dist-packages/matplotlib/externals/six.py", line 199, in load_module  
mod = mod._resolve()  
  File "/usr/lib/python2.7/dist-packages/matplotlib/externals/six.py", line 113, in _resolve  
return _import_module(self.mod)  
  File "/usr/lib/python2.7/dist-packages/matplotlib/externals/six.py", line 80, in _import_module  
__import__(name)  
  File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 42, in <module>  
raise ImportError, str(msg) + ', please install the python-tk package'  
ImportError: No module named _tkinter, please install the python-tk package 

I am on Linux so I did

sudo apt-get python-tk  

Google how to install python tkinter in Windows.

Good luck