Chandra X-Ray Observatory
Last modified: 28 June 2018

Can I use jupyter notebooks (or astropy, matplotlib, scipy) with CIAO-4.10?[New]


In order to use jupyter notebooks with CIAO, users must install the the jupyter package (and all supporting packages) into their CIAO installation.


Following this procedure has the potential to corrupt (break) your existing CIAO installation. You will be installing additional packages into the same directories as where CIAO is installed. Those packages may introduce conflicts with CIAO analysis tasks.

You must have write-access to the CIAO installation directories.

Follow these instructions at your own risk!

Requirements: Linux using the Python 3.5 edition of CIAO. This will not work with any of the Python 2.7 editions, nor with any of the macOS/OSX builds. The CXC does not have specific advice for Python 2.7 nor macOS/OSX users.

First, determine if you have a compatible version of on your system (more information about this is available in the Python bugs page). Source the CIAO setup script and then check the following import command

unix% source /soft/ciao/bin/ciao.bash
unix% python -c 'import ssl'

If this command succeeds (no error message), then you can proceed to the next step. If not, then you can see if your package manager provides and install it. Note: some newer Linux distributions only provide which is not compatible.

If the import works, then try to install jupyter using the pip module

unix% python -c 'import pip;pip.main()' install jupyter

Users can replace jupyter with matplotlib, astropy, scipy or other packages which can be installed using the pip command.

Note: since pip installs pre-compiled binaries of packages, those packages may not be 100% compatible with the version of python included in CIAO. Users will need to test those packages on their platform to see if this recipe worked.

To use jupyter it has to be executed using the ciaorun command:

unix% source /soft/ciao/bin/ciao.bash
unix% ciaorun jupyter notebook

This ensures that the CIAO modules and paths are setup correctly.

Last modified: 28 June 2018
Smithsonian Institute Smithsonian Institute

The Chandra X-Ray Center (CXC) is operated for NASA by the Smithsonian Astrophysical Observatory. 60 Garden Street, Cambridge, MA 02138 USA.   Email: Smithsonian Institution, Copyright © 1998-2017. All rights reserved.