auto backend discovery at start time
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
matplotlib (Ubuntu) |
Triaged
|
Wishlist
|
Unassigned | ||
Bug Description
Binary package hint: python-matplotlib
I am using Ubuntu 8.10. I installed the package python-matplotlib (0.98.3-4ubuntu1 (intrepid)). In my __init__.py I have:
import pylab
I am using Python 2.5.2. When I run the program I got the error:
Traceback (most recent call last):
File "__init__.py", line 4, in <module>
import pylab
File "/usr/lib/
from matplotlib.pylab import *
File "/usr/lib/
from matplotlib.pyplot import *
File "/usr/lib/
new_
File "/usr/lib/
globals(
File "/usr/lib/
import Tkinter as Tk, FileDialog
File "/usr/lib/
raise ImportError, str(msg) + ', please install the python-tk package'
ImportError: No module named _tkinter, please install the python-tk package
I installed the python-tk Ubuntu package and it cleared up. I guess a package dependency is missing?
Changed in matplotlib (Ubuntu): | |
status: | In Progress → Confirmed |
summary: |
- Missing package dependency + python-matplotlib: missing package dependency (python-tk) |
Changed in matplotlib (Ubuntu): | |
importance: | Undecided → Wishlist |
status: | Confirmed → Triaged |
summary: |
- python-matplotlib: missing package dependency (python-tk) + auto backend discovery at start time |
Changed in matplotlib (Ubuntu): | |
assignee: | Dmitrijs Ledkovs (dmitrij.ledkov) → nobody |
python-matplotlib 0.98.3-4ubuntu1 depends on "python-tk | python-gtk2 | python-wxgtk2.8 | python-qt3 | python-qt4". This means, that you need to have one of those packages installed. If you have none of those packages installed and you install python-matplotlib, python-tk will be installed. If you have one of those packages installed (except python-tk) and you install python-matplotlib, you have to install python-tk manually or change the default backend (in /etc/matplotlibrc).
You always need the python package installed wich correspond to the selected backend. I do not know how to assure that the correct python package is installed. The other way is to select the backend based on the installed packages. A plan for the future is to have a "auto" backend which searches for the installed packages and select the first he finds.