V
V
vipvizor2013-12-29 12:10:25
Python
vipvizor, 2013-12-29 12:10:25

How to set up Pylab (Python) library for Windows?

Hello! The other day I started learning Python, but I can't figure it out with pylab. I will be glad to any useful links on this topic. An error occurs when importing:

Traceback (most recent call last):
  File "/home/valeiii/Рабочий стол/untitled.py", line 7, in <module>
    import pylab
  File "/usr/lib/pymodules/python2.7/pylab.py", line 1, in <module>
    from matplotlib.pylab import *
  File "/usr/lib/pymodules/python2.7/matplotlib/pylab.py", line 265, in <module>
    from matplotlib.pyplot import *
  File "/usr/lib/pymodules/python2.7/matplotlib/pyplot.py", line 97, in <module>
    _backend_mod, new_figure_manager, draw_if_interactive, _show = pylab_setup()
  File "/usr/lib/pymodules/python2.7/matplotlib/backends/__init__.py", line 25, in pylab_setup
    globals(),locals(),[backend_name])
  File "/usr/lib/pymodules/python2.7/matplotlib/backends/backend_tkagg.py", line 8, in <module>
    import Tkinter as Tk, FileDialog
  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
[Finished in 0.4s]

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Ali Aliyev, 2013-12-29
@vipvizor

Install the python-tk package

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question