In the future, SpecViz will be distributed through package managers like Anaconda that will obviate the need for manual installation from source. Most of these will be handled automatically by the setup functions, with the exception of PyQt/PySide.

  • Python 3 (recommended) or Python 2
  • PyQt5 (recommended), PyQt4, or PySide
  • Astropy
  • Numpy
  • Scipy
  • PyQtGraph

Installing PyQt/PySide

The easiest way to install PyQt/PySide is through some package manager. Please keep in mind that PyQt5 is the recommended PyQt implementation as Qt4 development and support has ended.

Below are instructions for installing using either Homebrew or Anaconda.


Install using Homebrew for Qt5.

Installing PyQt5 with Anaconda will require installing from the Spyder-IDE channel as it is not currently a core package (but they’re working on it).

Further, Anaconda will panic if you have both PyQt4 and PyQt5 installed in the same environment. To work around this, it is strongly suggested you simply create a new virtual environment and install PyQt5 there:

$ conda create -n sviz_env python=3.5
$ source activate sviz_env
$ conda install --channel pyqt5


PyQt5 does not require Python 3. If you wish, you can create your virtual environment using Python 2 by specifying the version as shown above (e.g. python=2.7).


Install using Homebrew for Qt4.

Install using Anaconda:

$ conda install pyqt

Installing SpecViz

Clone the SpecViz repository somewhere on your system, and install locally using pip. If you are using an Anaconda virtual environment, please be sure to activate it first before installing: $ source activate sviz_env.

$ git clone
$ cd specviz
$ git checkout tags/v0.1.1rc3
$ pip install -r requirements.txt


This uses the pip installation system, so please note that

  1. You need to have pip installed (included in most Python installations).
  2. You do not need to run python install.
  3. You do not need to install the dependencies by hand (except for PyQt).

Likewise, the pip command will use your default Python to install. You can specify by using pip2 or pip3, if you’re not using a virtual environment.

Known Issues

On a Mac with Qt5, depending on exactly how you have set up Anaconda, you might see the following error after following the above instructions:

This application failed to start because it could not find or load the Qt platform plugin "cocoa".

Reinstalling the application may fix this problem.

If you see this message, you have encountered an incompatibility between Anaconda’s packaging of Qt4 and Qt5. The workaround is to uninstall Qt4 with the following command:

$ conda uninstall pyqt qt

and SpecViz should now happily run.

Launching SpecViz

Once PyQt/PySide and the other dependencies are installed, SpecViz can be launched from the command line:

$ specviz

Again, if you’re using an Anaconda virtual environment, please be sure to activate it before launching SpecViz.

If you only wish to inspect a single FITS or ASCII file using the default Custom Loaders file formatting, you can also pass in the filename as a command line argument, as follows:

$ specviz filename