error of install numpy on linux red hat
linux, numpy, python, scipy
Solution
If you are in Ubuntu(e.g. Ubuntu 12.04), it is very easy,
sudo apt-get install python-numpy
or you can compile from source through pip(I think on RedHat almost the same):
sudo apt-get install python-dev
sudo apt-get install python-pip
pip install numpy
Problem
I am trying to install numpy from http://www.scipy.org/Download . by `git clone git://github.com/numpy/numpy.git numpy` But, when I ran `python setup.py install` I got: `SystemError: Cannot compile 'Python.h'. Perhaps you need to install python-dev|python-devel` Where to get python-dev ? I tried: ``` $ easy_install python-devel Searching for python-devel Reading http://pypi.python.org/simple/python-devel/ Couldn't find index page for 'python-devel' (maybe misspelled?) Scanning index of all packages (this may take a while) Reading http://pypi.python.org/simple/ No local packages or download links found for python-devel error: Could not find suitable distribution for Requirement.parse('python-devel') ``` and ``` $ easy_install python-dev Searching for python-dev Reading http://pypi.python.org/simple/python-dev/ Couldn't find index page for 'python-dev' (maybe misspelled?) Scanning index of all packages (this may take a while) Reading http://pypi.python.org/simple/ No local packages or download links found for python-dev error: Could not find suitable distribution for Requirement.parse('python-dev') ``` Any help will be appreciated. In order to solve the problem of python-dev, I have installed python2.6 in my local dir. But, when I used python setup.py install --user to install numpy , I got: $ python setup.py install --user 'import site' failed; use -v for traceback Traceback (most recent call last): File "setup.py", line 18, in import os ImportError: No module named os in python2.6 I got: >>> import os Traceback (most recent call last): File "", line 1, in ImportError: No module named os Any help will be appreciated. thanks The following links are not helpful because I do not have root right and cannot use sudo. example1 example2