matplotlib-py3 branch won't show in Ubuntu 10.04

Hello,

I was trying to test out the Python 3 development version with the first plot shown in the pyplot tutorial. Everything seems to work ok until I go

plt.show()

at which point nothing happens, I don’t see a plot. Python accepts the command and is waiting for a new command but I have no plot.

I’ve tried changing the backend in the matplotlibrc file to TkAgg, but I still get nothing, in fact now when I try to import matplotlib I get a traceback error that name -tkagg is not defined, seems like it might be something in the module.

Can anyone lend a hand?

Thanks,

Jorge Garcia

Hello,

I was trying to test out the Python 3 development version with the first
plot shown in the pyplot tutorial. Everything seems to work ok until I go

plt.show()

at which point nothing happens, I don't see a plot. Python accepts the
command and is waiting for a new command but I have no plot.

Maybe you don't have a python-3 compatible gui library installed, in
which case your backend is defaulting to AGG, which cannot render a
window for you.

I've tried changing the backend in the matplotlibrc file to TkAgg, but I
still get nothing, in fact now when I try to import matplotlib I get a
traceback error that name -tkagg is not defined, seems like it might be
something in the module.

Can anyone lend a hand?

Posting the exact traceback would help us help you. I'll hazard a
guess that you don't have the tk development packages installed, so
the tkagg backend could not be built when you installed matplotlib for
py3, and therefore tkagg cannot be selected as your backend.

Darren

···

On Wed, Jun 29, 2011 at 10:46 AM, Jorge Garcia <jgarc063@...3649...> wrote:

Hi Darren,

I think your correct, the matplotlibrc file says that the backend is set to Agg.

Here’s the traceback:

BUILDING MATPLOTLIB
matplotlib: 1.1.0
python: 3.1.2 (r312:79147, Sep 27 2010, 09:45:41) [GCC
4.4.3]
platform: linux2

REQUIRED DEPENDENCIES
numpy: 1.6.0
freetype2: 9.22.3

OPTIONAL BACKEND DEPENDENCIES
libpng: 1.4.7
Tkinter: no
* Using default library and include directories for
* Tcl and Tk because a Tk window failed to open.
* You may need to define DISPLAY for Tk to work so
* that setup can determine where your libraries are
* located. Tkinter present, but header files are not
* found. You may need to install development
* packages.
Gtk+: no
* Building for Gtk+ requires pygtk; you must be able
* to “import gtk” in your build/install environment
Mac OS X native: no
Qt: no
Qt4: no
Cairo: no

OPTIONAL DATE/TIMEZONE DEPENDENCIES
datetime: present, version unknown
dateutil: 1.5
pytz: 2011c

OPTIONAL USETEX DEPENDENCIES
dvipng: 1.12
ghostscript: 8.71
latex: 3.1415926
pdftops: 0.12.4

[Edit setup.cfg to suppress the above messages]

···

============================================================================
pymods [‘pylab’]
packages [‘matplotlib’, ‘matplotlib.backends’, ‘matplotlib.backends.qt4_editor’, ‘matplotlib.projections’, ‘matplotlib.testing’, ‘matplotlib.testing.jpl_units’, ‘matplotlib.tests’, ‘mpl_toolkits’, ‘mpl_toolkits.mplot3d’, ‘mpl_toolkits.axes_grid’, ‘mpl_toolkits.axes_grid1’, ‘mpl_toolkits.axisartist’, ‘matplotlib.sphinxext’, ‘matplotlib.tri’, ‘matplotlib.delaunay’]
running build
running build_py
copying lib/matplotlib/mpl-data/matplotlibrc → build/lib.linux-i686-3.1/matplotlib/mpl-data
copying lib/matplotlib/mpl-data/matplotlib.conf → build/lib.linux-i686-3.1/matplotlib/mpl-data
running build_ext

On Fri, Jul 8, 2011 at 2:49 PM, Darren Dale <dsdale24@…287…> wrote:

On Wed, Jun 29, 2011 at 10:46 AM, Jorge Garcia <jgarc063@…3649…> wrote:

Hello,

I was trying to test out the Python 3 development version with the first

plot shown in the pyplot tutorial. Everything seems to work ok until I go

plt.show()

at which point nothing happens, I don’t see a plot. Python accepts the

command and is waiting for a new command but I have no plot.

Maybe you don’t have a python-3 compatible gui library installed, in

which case your backend is defaulting to AGG, which cannot render a

window for you.

I’ve tried changing the backend in the matplotlibrc file to TkAgg, but I

still get nothing, in fact now when I try to import matplotlib I get a

traceback error that name -tkagg is not defined, seems like it might be

something in the module.

Can anyone lend a hand?

Posting the exact traceback would help us help you. I’ll hazard a

guess that you don’t have the tk development packages installed, so

the tkagg backend could not be built when you installed matplotlib for

py3, and therefore tkagg cannot be selected as your backend.

Darren

In case it helps,

I also tried the simple plot test recommended in the matplotlib FAQ:

Here’s the traceback it gave me.

$HOME=/home/cadsoft
CONFIGDIR=/home/cadsoft/.matplotlib
matplotlib data path /usr/local/lib/python3.1/dist-packages/matplotlib/mpl-data
loaded rc file /usr/local/lib/python3.1/dist-packages/matplotlib/mpl-data/matplotlibrc
matplotlib version 1.1.0
verbose.level helpful
interactive is False
platform is linux2
Using fontManager instance from /home/cadsoft/.matplotlib/fontList.py3k.cache
backend agg version v2.2

Thanks for all of your help.

···

On Fri, Jul 8, 2011 at 2:49 PM, Darren Dale <dsdale24@…287…> wrote:

On Wed, Jun 29, 2011 at 10:46 AM, Jorge Garcia <jgarc063@…120…3649…> wrote:

Hello,

I was trying to test out the Python 3 development version with the first

plot shown in the pyplot tutorial. Everything seems to work ok until I go

plt.show()

at which point nothing happens, I don’t see a plot. Python accepts the

command and is waiting for a new command but I have no plot.

Maybe you don’t have a python-3 compatible gui library installed, in

which case your backend is defaulting to AGG, which cannot render a

window for you.

I’ve tried changing the backend in the matplotlibrc file to TkAgg, but I

still get nothing, in fact now when I try to import matplotlib I get a

traceback error that name -tkagg is not defined, seems like it might be

something in the module.

Can anyone lend a hand?

Posting the exact traceback would help us help you. I’ll hazard a

guess that you don’t have the tk development packages installed, so

the tkagg backend could not be built when you installed matplotlib for

py3, and therefore tkagg cannot be selected as your backend.

Darren

Thank you everyone for your help,

In the end, I wasn’t able to get Tkinter to register as the backend, so I downloaded and setup PyQt4.

Once PyQt4 was setup, I changed the backend to Qt4Agg in the matplotlibrc file and that worked properly.

Best Regards,
Jorge Garcia

···

On Wed, Jul 13, 2011 at 3:55 PM, Jorge Garcia <jgarc063@…3649…> wrote:

In case it helps,

I also tried the simple plot test recommended in the matplotlib FAQ:

Here’s the traceback it gave me.

$HOME=/home/cadsoft
CONFIGDIR=/home/cadsoft/.matplotlib
matplotlib data path /usr/local/lib/python3.1/dist-packages/matplotlib/mpl-data

loaded rc file /usr/local/lib/python3.1/dist-packages/matplotlib/mpl-data/matplotlibrc
matplotlib version 1.1.0
verbose.level helpful
interactive is False
platform is linux2
Using fontManager instance from /home/cadsoft/.matplotlib/fontList.py3k.cache

backend agg version v2.2

Thanks for all of your help.

On Fri, Jul 8, 2011 at 2:49 PM, Darren Dale <dsdale24@…287…> wrote:

On Wed, Jun 29, 2011 at 10:46 AM, Jorge Garcia <jgarc063@…3649…> wrote:

Hello,

I was trying to test out the Python 3 development version with the first

plot shown in the pyplot tutorial. Everything seems to work ok until I go

plt.show()

at which point nothing happens, I don’t see a plot. Python accepts the

command and is waiting for a new command but I have no plot.

Maybe you don’t have a python-3 compatible gui library installed, in

which case your backend is defaulting to AGG, which cannot render a

window for you.

I’ve tried changing the backend in the matplotlibrc file to TkAgg, but I

still get nothing, in fact now when I try to import matplotlib I get a

traceback error that name -tkagg is not defined, seems like it might be

something in the module.

Can anyone lend a hand?

Posting the exact traceback would help us help you. I’ll hazard a

guess that you don’t have the tk development packages installed, so

the tkagg backend could not be built when you installed matplotlib for

py3, and therefore tkagg cannot be selected as your backend.

Darren