Modify

Opened 4 years ago

Last modified 3 years ago

#7986 new defect

Installation instruction

Reported by: sam/at/hellosam.net Owned by: rjollos
Priority: high Component: TracMetrixPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11

Description

Please list python-tk as the required component, because it is and it's not obvious to me until I turn on the log :)

2010-11-04 10:20:07,641 Trac[loader] DEBUG: Loading tracmetrixplugin.api from /home/sam/trac/pszhan/plugins/TracMetrixPlugin-0.1.8-py2.6.egg
2010-11-04 10:20:07,641 Trac[loader] DEBUG: Loading tracmetrixplugin.web_ui from /home/sam/trac/pszhan/plugins/TracMetrixPlugin-0.1.8-py2.6.egg
2010-11-04 10:20:07,645 Trac[loader] ERROR: Skipping "tracmetrixplugin.web_ui = tracmetrixplugin.web_ui": (can't import "ImportError: No module named _tkinter, please install the python-tk package")

Attachments (0)

Change History (6)

comment:1 Changed 4 years ago by rjollos

Thanks, I will take a look. I didn't realize that python-tk was a dependency, but we can take care of this by adding the dependency to setup.py.

comment:2 Changed 4 years ago by rjollos

  • Status changed from new to assigned

I'm fairly new to Python, so not knowing any better I did a pretty ugly experiment to determine where this dependency was coming from. I removed python-tk from my system, and ran the following:

>>> from pylab import date2num, num2date, drange
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/pymodules/python2.6/pylab.py", line 1, in <module>
    from matplotlib.pylab import *
  File "/usr/lib/pymodules/python2.6/matplotlib/pylab.py", line 247, in <module>
    from matplotlib.pyplot import *
  File "/usr/lib/pymodules/python2.6/matplotlib/pyplot.py", line 78, in <module>
    new_figure_manager, draw_if_interactive, show = pylab_setup()
  File "/usr/lib/pymodules/python2.6/matplotlib/backends/__init__.py", line 25, in pylab_setup
    globals(),locals(),[backend_name])
  File "/usr/lib/pymodules/python2.6/matplotlib/backends/backend_tkagg.py", line 7, in <module>
    import Tkinter as Tk, FileDialog
  File "/usr/lib/python2.6/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

Assuming pylab is the only package that depends on python-tk, we should be able to get rid of pylab as a dependency by using Trac's datetime utils. This will be one of the tasks in the major rework of this plugin.

The TracMetrixPlugin wiki page has been updated to list the dependency. The dependency will be added to setup.py on the next check-in.

comment:3 Changed 4 years ago by rjollos

(In [9432]) Added required packages to setup.py. Refs #7986.

comment:4 Changed 4 years ago by rjollos

I added the other required packages to setup.py, but haven't figured out how to add python-tk as a requirement. Any ideas?

comment:5 Changed 4 years ago by rjollos

  • Priority changed from normal to high

comment:6 Changed 3 years ago by rjollos

  • Status changed from assigned to new

Add Comment

Modify Ticket

Action
as new .
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.