STScI Logo

Space Telescope Science Institute
Installing stsci python

Installing STSCI_PYTHON

STSCI_PYTHON is available from the Python Package Index as a meta-package. You can install this with easy_install or pip. Because of the confusion that sometimes arises with package names that contain dash or underline, the name of the package is "stscipython".

These instructions assume that you already have Python 2.7, Numpy, and distribute installed. If you will be installing on Linux or Macintosh, you also need pip and the compiler packages for your system.

On Linux, python and related pre-requisites are usually available through the package managers. Unfortunately, the details vary across Linux distributions and even from one version to the next, so we cannot give you instructions here. Most Linux distributions have an online forum for support.

There are a few things to watch out for, so please read the instructions below:

Macintosh Binaries

We do not have the Macintosh DMG file that was available for previous versions of stsci_python. Check back around June 2013. It is not practical for you to try to upgrade the software from the old DMG by installing this new software over it.

Installing on Linux or Macintosh using pip

To install stscipython on a Linux or Macintosh system, use these commands:

pip install d2to1
pip install stscipython

You must install d2to1 first in a separate step.

Installing stscipython with pip will require that you have compiler packages installed on your computer.

Installing on Microsoft Windows using easy_install

We provided binary distributions for 32 bit Python 2.7 on Windows. (The 32 bit Python will work on 64 bit Windows computers, but you must have 32 bit versions of both python and numpy.) To install stsci_python, type these commands into a cmd window:

c:\python27\Scripts\easy_install d2to1
c:\python27\Scripts\easy_install stsci_python

You must install d2to1 first in a separate step.

In testing, we have occasionally observed easy_install aborting with an error, either reporting network problems or sometimes no clear reason. If this happens, press the up-arrow key and enter to repeat the command. easy_install will recognize that part of the software has been installed and continue.

Downloading source code

STSCI_PYTHON is now distributed as several separate packages, so that it can more readily fit into the pypi/pip/easy_install ecosystem. You can download individual packages by searching for them on the Python Package Index.

You can also use pip to automatically download all the source code.

On Linux or Macintosh, use this command:

pip install --download . stscipython

The thing after --download is the name of the directory to download into; in this example, it is "." which is the current directory.