Odd install error

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

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 Download matplotlib-1.3.0.tar.gz (matplotlib)
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
matplotlib-devel List Signup and Options

--
                    _

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

There is setup_requires, and from the documentation that I see, I wonder if listing NumPy in both build_requires and install_requires invokes a special handling to install setup requirements in the same place as install requirements?

Ben

This thread from h5py may be relevant (https://github.com/h5py/h5py/pull/356).

Tom

···

On Fri, Sep 20, 2013 at 9:41 AM, Benjamin Root <ben.root@…553…> wrote:

There is setup_requires, and from the documentation that I see, I wonder if listing NumPy in both build_requires and install_requires invokes a special handling to install setup requirements in the same place as install requirements?

Ben


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


Thomas A Caswell
PhD Candidate University of Chicago
Nagel and Gardel labs
tcaswell@…1163…

jfi.uchicago.edu/~tcaswell
o: 773.702.7204

Wow – setup_requires is new to me. It’s worth a shot.
Mike

···

On 09/20/2013 10:41 AM, Benjamin Root
wrote:

      There is setup_requires, and from the documentation that I

see, I wonder if listing NumPy in both build_requires and
install_requires invokes a special handling to install setup
requirements in the same place as install requirements?

Ben

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

http://www.droettboom.com

See #2445.

···

On 09/20/2013 11:03 AM, Michael Droettboom wrote:

On 09/20/2013 10:41 AM, Benjamin Root wrote:

There is setup_requires, and from the documentation that I see, I wonder if listing NumPy in both build_requires and install_requires invokes a special handling to install setup requirements in the same place as install requirements?

Ben

Wow -- setup_requires is new to me. It's worth a shot.

Mike

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

http://www.droettboom.com

------------------------------------------------------------------------------
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
matplotlib-devel List Signup and Options

--
                    _

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