I would like to install the PyFITS library (link) which is not available through OpenCSW. I installed py_numpy (a prerequisite) and py_pip from OpenCSW. I then try to install numpy via
pip install pyfits
as instructed on the website above. pip finds the packages, downloads it, but fails to install with the message "Numpy is required to build this package. Please install Numpy on your system first."
pip install numpy
provides me with the message "Requirement already satisfied - numpy in ./lib/python2.6/site-packages"
Could somebody guide me how I can install a Python library that is not on the OpenCSW repository?
Thanks a lot for any advise!
asked: 2015-11-12 by: Luke
Can you check which Python binary pip uses? The system Python, Python 2.7 or Python 2.6?
Sorry, I missed your post. Argh, you are right... I installed a Solaris 10 VM inside Oracle's VM Box Manager and I was not aware that this one ships already with a system Python. It would be nice though to get packages compiled in the native Python instead of having a second Python installation... For now I just "disabled" the system python so it uses the csw version.
PyFITS is distributed as distutils distribution. Installation simply involves unpacking the package and executing:
% python setup.py install
to install it in Python's site-packages directory. Alternatively the command
% python setup.py install --prefix="/destination/directory/"
will install PyFITS in an arbitrary tree. Once numpy has been installed, PyFITS should be available for use under Python.
PyFITS is also hosted on the Python Packaing Index and may be installed by running:
% pip install pyfits
% easy_install pyfits
(pip is the Python package installer--see http://pypi.python.org/pypi/pip to get pip. easy_install can also be used.) Note for Windows users: Because pip only installs packages from source, using pip to install PyFITS may fail if you don't have a build environment set up. In this case either use easy_install, or download and run the Windows installer directly.
Note: The nightly tarball is no longer available. To install the latest development version of PyFITS, run:
% pip install svn+https://svn.assembla.com/svn/pyfits/trunk
or check out a working copy from SVN and install from there; see the Developing section below. Because this is the bleeding edge, it is not guaranteed to be stable. by netbank