There are several ways to get Chaco. The easiest way is through Enthought Deployment Manager (formerly EPD) which provides environment management and package installation tools for Windows, Linux and MacOS. Chaco may also be available through a package manager on your platform, such as apt on Ubuntu, yum on Redhat or MacPorts on OS X. You can also build Chaco from its source code, but because of the dependencies, the easiest way by far is to install EDM.
Python 2.7 or 3.5+
Traits, an event notification framework
TraitsUI, a rapid GUI application development framework
Kiva, part of the enable project, for rendering 2-D graphics to a variety of backends across platforms
Enable, a framework for writing interactive visual components, and for abstracting away GUI-toolkit-specific details of mouse and keyboard handling.
NumPy, for dealing efficiently with large datasets
Installing Chaco with EDM¶
To install via EDM, download EDM for your platform and then do (from the command line)
edm install chaco pyqt5
to install Chaco, PyQt, and their dependencies and then
to enter the Python environment with these packages installed.
PyQt5 is one of multiple supported backends. Other options include PyQt, Pyside2, or wxPython.
Installing Chaco from Source¶
If you choose to build Chaco rather than installing from a package manager you will need a build environment that includes the standard C/C++ compiler for your platform and Python version (see the Python documentation for more information). If you are going to build the dependencies you will also need to install SWIG and you may want to install Cython if you want to update the extension modules in Chaco.
Installation via Pip¶
Chaco itself uses standard Python packaging via a setup.py script, so once you have your build environment set up, you can install using Pip as you would any other Python package.
$ pip install chaco
This will download the source distribution from PyPI and automatically build Chaco and its dependencies for you.
If you have already installed Chaco and just want to update to the newest version, use
$ pip install --upgrade chaco
Installation via setup.py¶
Alternatively, you can download the source code from the Chaco GitHub repository and use the standard setup.py installation commands:
$ python setup.py install
This will attempt to install and build all dependencies as part of the installation process.
Developer Live Installation¶
It is also possible to install a live-editable source installation using
$ pip install -e .
at the top level of the Chaco source code.
Chaco contains a number of C extension modules used mainly for speed. In the current version of Chaco, the following extension modules are currently used:
This is a Cython extension which speeds up a number of standard operations, currently mainly involving color maps. If this is not available, Chaco will fall back on slower NumPy-based algorithms.
Contour tracing on quadrilateral meshes. This is required for contour plots.
Implementation of the “largest triangle three buckets” downsampling algorithm for line plots. If this is not available, then “lttb” downsampling of line plots will fail.
The Chaco source code includes the generated
*.c files for each of the Cython
*.pyx files, so Cython is not required to build Chaco. It is needed, however
if you are going to make changes to the Cython extension modules.