Anaconda Python Distribution (Recommended)¶
Platforms: MacOS X, Linux, and Windows
We recommend using the Anaconda Python distribution from Continuum Analytics (or the related Miniconda distribution). Anaconda includes all of Glue’s main dependencies. There are two ways of installing Glue with the Anaconda Python Distribution: graphically using the Anaconda Navigator, or using the conda command on the command-line, both of which are described below.
Once Anaconda is installed, go to the Applications folder and launch the Anaconda Navigator:
If you do not have the Anaconda Navigator icon, but have an Anaconda Launcher, you are using an old version of Anaconda. See here for alternate instructions.
Assuming you have the navigator open, before installing glue first click on the Channels button:
If not already present, add conda-forge to the list of channels by clicking on Add, typing conda-forge, and pressing enter, then click on Update channels:
You can now install the latest version of glue by clicking on Install:
Once the installation is complete, you can click on the Launch button (which will replace the Install button).
To install or update glue on the command-line, simply do:
conda install -c conda-forge glueviz
Installing with pip¶
Platforms: MacOS X, Linux, and Windows
Installing glue with pip is also possible, although you will need to first make sure that you install Qt and either PyQt or PySide, since these cannot be automatically installed. See the section on Installing PyQt or PySide
Assuming that you have either PyQt or PySide installed, you can install glue along with all required and optional dependencies using:
pip install glueviz[all]
The above will include domain-specific plugins. If you only want to install glue with all required and only non-domain-specific optional dependencies (for example excluding the optional dependencies for astronomy), you can do:
pip install glueviz[recommended]
And finally, if you don’t want to install optional dependencies at all:
pip install glueviz
Note that this will still installed required dependencies.
Platforms: MacOS X
Mac users with OS X >= 10.7 can download Glue as a standalone program. This is a fast way to get started with using Glue, but this application includes its own version of Python, and will not recognize any packages in other Python installations. If you want to use glue in your existing Python installation, follow instructions in the other sections. Note that there may be a delay between when a release is announced, and when the dmg installer is available.
Glue has the following required dependencies:
- Python 2.7, or 3.3 and higher
- Numpy 1.9 or later
- Matplotlib 1.4 or later
- Pandas 0.14 or later
- Astropy 1.0 or higher
- setuptools 1.0 or later
- Either PySide or PyQt (both PyQt4 and PyQt5 are supported)
- QtPy 1.1.1 or higher - this is an abstraction layer for the Python Qt packages
- IPython 4.0 or higher
- dill 0.2 or later (which improves session saving)
- h5py 2.4 or later, for reading HDF5 files
- xlrd 1.0 or later, for reading Excel files
- glue-vispy-viewers, which provide 3D viewers
The following optional dependencies are also highly recommended and domain-independent:
Finally, there are domain-specific optional dependencies. For astronomy, these are:
You can check which dependencies are installed and which versions are available by running (once glue is installed):
It is also possible to install missing dependencies with:
Installing PyQt or PySide¶
If you are using Linux, PyQt and PySide will typically be available in the built-in package manager. For example, if you are using Ubuntu, then you can do:
sudo apt-get install python-qt4
for Python 2, and:
sudo apt-get install python3-pyqt4
for Python 3. If you are using MacOS X, then if you are using MacPorts to manage your Python installation, you can do:
sudo port install py35-pyqt4
assuming you are using Python 3.5 (modify the
py35 version as needed).
Graphical installation with old versions of Anaconda¶
If you have the Anaconda Python Distribution, but have the Anaconda Launcher instead of the Anaconda Navigator, you will be presented with a window that looks like the following when opening the Launcher:
As you can see, glue is already in the list (under the name glueviz). However, we need to tell Anaconda to get the latest version of glue from the conda-forge channel (the default version available is otherwise not the most recent). To do this, click on Manage Channels in the top right of the window, which will bring up a small window - type conda-forge into the field and click on Add Channel, then Submit:
Once you have done this, you can install glue by clicking on the Install button corresponding to the glueviz entry. If you have already installed glue, and want to update, you can click on the Update button.
Installing glue from source will create a executable
that should be in your path. Running
glue from the command line will
start the program. Glue accepts a variety of command-line
glue --help for examples.
On Windows, installation creates an executable
within the python script directory (e.g.,
Windows users can create a desktop shortcut for this file, and run
Glue by double clicking on the icon.
Installing the latest developer version¶
If you are using conda, the easiest way to get all the dependencies installed when using the developer version is to first install the stable version, which will pull in all the dependencies, then to remove it and install the developer version:
conda install -c conda-forge glueviz glue-vispy-viewers conda remove glueviz glue-vispy-viewers git clone git://github.com/glue-viz/glue cd glue pip install . cd .. git clone git://github.com/glue-viz/glue-vispy-viewers cd glue-vispy-viewers pip install . cd ..
If you want to then uninstall the developer versions and install the stable versions again, you can uninstall the developer versions with:
pip uninstall glueviz glue-vispy-viewers
then install the stable versions with conda.