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."

However, typing

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 12 Nov '15, 03:34

Luke's gravatar image

accept rate: 0%

Can you check which Python binary pip uses? The system Python, Python 2.7 or Python 2.6?

permanent link

answered 12 Nov '15, 08:07

cgrzemba's gravatar image

cgrzemba ♦♦
accept rate: 9%

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.


permanent link

answered 03 Dec '15, 06:29

Luke's gravatar image

accept rate: 0%

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

permanent link

answered 16 Dec '16, 00:49

sahaeta9's gravatar image

accept rate: 0%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 12 Nov '15, 03:34

question was seen: 5,778 times

last updated: 16 Dec '16, 00:49

powered by OSQA