Unfortunately, this is a known bug in setuptools.  It has no concept of "build time" dependencies, so it probably computed all of the dependencies correctly, but it doesn't install them in the correct order -- it just assumes that as long as everything gets installed it will work when it's finally run.  This is the same problem that means even though matplotlib specifies numpy as a dependency, "pip install matplotlib" will not work unless numpy is already installed.  This is a perennial problem, and apparently the setuptools guys spend very little time considering C extensions at all.

Mike

On 09/20/2013 09:37 AM, Benjamin Root wrote:
So, I was working from a completely fresh virtualenv, installing a package that had a matplotlib dependency. As it happens to be, the dependencies in this package lists matplotlib prior to numpy, so matplotlib got processed first. For whatever reason, while processing matplotlib, it didn't seem to think that it depended upon NumPy, but failed anyway when it couldn't find it.  See the following output:

Best match: matplotlib 1.3.0
Downloading https://downloads.sourceforge.net/project/matplotlib/matplotlib/matplotlib-1.3.0/matplotlib-1.3.0.tar.gz
Processing matplotlib-1.3.0.tar.gz
Writing /tmp/easy_install-ZJ_Xb6/matplotlib-1.3.0/setup.cfg
Running matplotlib-1.3.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-ZJ_Xb6/matplotlib-1.3.0/egg-dist-tmp-OqRvd1
============================================================================
Edit setup.cfg to change the build options

BUILDING MATPLOTLIB
            matplotlib: yes [1.3.0]
                python: yes [2.7.1 (r271:86832, Dec  8 2011, 15:48:40)  [GCC
                        4.1.2 20080704 (Red Hat 4.1.2-51)]]
              platform: yes [linux2]

REQUIRED DEPENDENCIES AND EXTENSIONS
error: Setup script exited with Requires numpy 1.5 or later to build.  (Numpy not found)
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
  File "/usr/local/CentOS5/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
    func(*targs, **kargs)
  File "/usr/local/CentOS5/lib/python2.7/multiprocessing/util.py", line 258, in _exit_function
    info('process shutting down')
TypeError: 'NoneType' object is not callable
Error in sys.exitfunc:
Traceback (most recent call last):
  File "/usr/local/CentOS5/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
    func(*targs, **kargs)
  File "/usr/local/CentOS5/lib/python2.7/multiprocessing/util.py", line 258, in _exit_function
    info('process shutting down')
TypeError: 'NoneType' object is not callable

Thoughts?
Ben Root


------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13. 
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk


_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


-- 
                   _                            
|\/|o _|_  _. _ | | \.__  __|__|_|_  _  _ ._ _  
|  ||(_| |(_|(/_| |_/|(_)(/_|_ |_|_)(_)(_)| | | 

http://www.droettboom.com