title: Install numpy + pandas as dependency in setup.py
body: <p>Installing <code>numpy</code> + <code>pandas</code> via setuptools as dependency in setup.py does not work for me. It is not about missing dependencies. If I install numpy via <code>pip install numpy</code> and afterwards <code>python setup.py develop</code> everything works fine. If I understand the <code>setuptools</code> documentation right, all packages are build first and then installed. So <code>numpy</code> is build, but not installed when <code>pandas</code> is build.</p>
  
  <p>As a workaround I added <code>numpy</code> to my <code>setup_requires</code>. That works fine, but is obviously not a very clean solution.</p>
  
  <p>Does anybody know a clean solution (Linux only is fine) for installing numpy + pandas via setuptools?</p>
  
  <p><strong>Update:</strong></p>
  
  <p>The dependency is configure via</p>
  
  <pre><code>install_requires=['numpy','pandas']
  </code></pre>
  
  <p>It does not make a difference, whether I add numpy explicitly or just add pandas. In both cases numpy will be downloaded and build, but pandas fails to build because some headers (which probably are installed during the install step of numpy, but not while building) cannot be found. If I install numpy first, everything works fine. I can reproduce this 100% and independent of the project I'm working on.</p>
  
  <p><strong>Update 2:</strong></p>
  
  <p>This is the end of the stack trace:</p>
  
  <pre><code>  File "/tmp/easy_install-QMa4ce/pandas-0.14.1/temp/easy_install-f6lreI/numpy-1.9.0/numpy/distutils/command/build_src.py", line 153, in run
    File "/tmp/easy_install-QMa4ce/pandas-0.14.1/temp/easy_install-f6lreI/numpy-1.9.0/numpy/distutils/command/build_src.py", line 170, in build_sources
    File "/tmp/easy_install-QMa4ce/pandas-0.14.1/temp/easy_install-f6lreI/numpy-1.9.0/numpy/distutils/command/build_src.py", line 329, in build_extension_sources
    File "/tmp/easy_install-QMa4ce/pandas-0.14.1/temp/easy_install-f6lreI/numpy-1.9.0/numpy/distutils/command/build_src.py", line 386, in generate_sources
    File "numpy/core/setup.py", line 432, in generate_config_h
  
    File "numpy/core/setup.py", line 42, in check_types
      entry_points={
    File "numpy/core/setup.py", line 293, in check_types
  
  SystemError: Cannot compile 'Python.h'. Perhaps you need to install python-dev|python-devel.
  </code></pre>
  
  <p>The message at the end is definitively wrong. If I do a <code>pip install numpy</code> before running <code>python setup.py develop</code> everything works fine. In the example above, I had only <code>pandas</code> in <code>install_requires</code> and no <code>numpy</code>. But as far as I could figure out, it makes no difference whether <code>numpy</code> is added explicitly or not.</p>