Chaco install problem

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Chaco install problem

This post has NOT been accepted by the mailing list yet.

When I run a simple Chaco test plot, I get the following error

File "/usr/local/lib/python2.7/site-packages/kiva/agg/", line 132, in __init__
    this = _plat_support.new_PixelMap(*args)
TypeError: in method 'new_PixelMap', argument 5 of type 'bool'

This error was reported in, with a solution
to use Canopy.  I'd prefer an open source solution.

I'm running:
OS X: 10.9.3
python 2.7.6
setuptools 3.6
PySide 1.2.2
Qt 4.8.6
numpy 1.8.1
scipy 0.12.0
ETS 4.4.1 (then upgraded to 4.4.2 with manual install (python install), but no diffierence)

To get started, I installed the folowing packages:

brew install qt
brew install pyqt
easy_install Mayavi[app]
brew install pyside

At this point I am able to write Mayvi apps using pyside.  
Then I wanted to start using Chaco, so I installed

brew install swig
easy_install PIL
easy_install chaco (also tried pip install chaco, but then uninstalled it)
easy_intall reportlab
easy_install ets

Now Chaco and related modules seem to import, but when running a
simple test case, I get the error listed above.  The simple test case:

import os
os.environ['ETS_TOOLKIT'] = 'qt4'
os.environ['QT_API'] = 'pyside'
import sip
sip.setapi('QString', 2)

from traits.api import HasTraits, Array
from traitsui.api import View
from chaco.chaco_plot_editor import ChacoPlotItem
from numpy import arange

class Data(HasTraits):
    volume = Array
    pressure = Array
    traits_view = View(ChacoPlotItem("volume", "pressure", resizable=True),
                       resizable = True, width=900, height=800)

    def _volume_default(self):
        return arange(.1, 100)

    def _pressure_default(self):
        return arange(.1, 10)

if __name__ == '__main__':
    viewer = Data()

Many thanks for help.