These instructions are for users who have all required supporting packages present on their systems, and their python installation already works with all those required modules enabled. In other words, the stand-alone PyRAF installation is for those users who know what they are doing.
Or, you may wish instead to install all of stsci_python .
There are two methods described below since you may either install via "setup.py" or via "pip".
Installing via "setup.py"
To install the stand-alone PyRAF build, download and then unpack the source distribution file in some temporary area on disk. PyRAF requires the packages d2to1, stsci.distutils, and stsci.tools from stsci_python, so they have been included for you in the tar file.
- gunzip pyraf-n.m.tar.gz
- tar xvf pyraf-n.m.tar
- cd pyraf-n.m/required_pkgs/d2to1
- python setup.py install # this installs d2to1
- cd ../stsci.tools
- python setup.py install # this installs stsci.tools
- cd ../..
- python setup.py install # this installs pyraf
This will install d2to1 and stsci.tools and then PyRAF into the Python installation found in your PATH. The process may also require the package "distribute" (and possibly other installer-related packages), but if so, the installation should automatically download and install them for you.
If you have multiple installations of Python on your machine, use the fully qualified pathname to the python executable above in place of "python".
python setup.py --help
Installing via "pip"
To install the stand-alone PyRAF build (and all of its requirements) via "pip", you will first need to install "pip" itself. When you have a working pip on the shell command line, use it to install PyRAF. Note that our installation process via pip is new (as of May 2013) and we are still working out some kinks.
- pip install pyraf
This will download and install stsci.tools and then PyRAF into the Python installation found in your PATH, or the one associated with the version of pip found on your PATH. This will require internet access.
If you have multiple installations of Python on your machine, use the fully qualified pathname to the correct pip executable above in place of "pip".
Also if you wish you may visit the pip pyraf page.
If you are installing using the "--home" arg (e.g. you do not have permission to install to your Python installation area), the directions are similar. Use the install command:
python setup.py install --home='/home/bob/my_installs'
But make sure you also set your PYTHONPATH to point to "/home/bob/my_installs/lib/python". This will need to be done before the actual install of PyRAF since it uses stsci.tools during installation.
You may also want to try using Virtualenv (www.virtualenv.org)
If you are installing the Python-3-supporting version of PyRAF (and you have downloaded the appropriate file), you will not need to do anything special or run the 2to3 tool - this has already been done for you. Simply install as listed above.
If you wish to perform manual installations of other STScI software packages as you have done above with PyRAF, you may download any parts you need at:
and instructions on manual installation are here.
If you have any difficulties with the installation of any of the packages in stsci_python, or even if you just have questions or suggestions, please do not hesitate to contact us at email@example.com.