<p dir="auto"><em>Original ticket <a href="http://projects.scipy.org/numpy/ticket/999" rel="nofollow">http://projects.scipy.org/numpy/ticket/999</a> on 2009-02-05 by trac user mjwakefield, assigned to <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/dmcooke/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/dmcooke">@dmcooke</a>.</em></p>
<p dir="auto">When NumPy is listed as a dependency for another package automatic installation of NumPy fails.<br>
easy_install numpy works successfully</p>
<p dir="auto">Best match: numpy 1.2.1<br>
Downloading <a href="http://downloads.sourceforge.net/numpy/numpy-1.2.1.tar.gz?modtime=1225265011&amp;big_mirror=0" rel="nofollow">http://downloads.sourceforge.net/numpy/numpy-1.2.1.tar.gz?modtime=1225265011&amp;big_mirror=0</a><br>
Processing numpy-1.2.1.tar.gz<br>
Running numpy-1.2.1/setup.py -q bdist_egg --dist-dir /var/folders/Kg/KgodBp6HFYaMgVoWCkGln+++mNU/-Tmp-/easy_install-p3img4/numpy-1.2.1/egg-dist-tmp-H5FSHT<br>
Running from numpy source directory.<br>
Warning: distutils distribution has been initialized, it may be too late to add a subpackage command<br>
Warning: distutils distribution has been initialized, it may be too late to add a subpackage fcompiler<br>
non-existing path in '/private/var/folders/Kg/KgodBp6HFYaMgVoWCkGln+++mNU/-Tmp-/easy_install-p3img4/numpy-1.2.1/numpy/distutils': 'site.cfg'<br>
Warning: distutils distribution has been initialized, it may be too late to add a subpackage distutils<br>
Warning: distutils distribution has been initialized, it may be too late to add a subpackage testing<br>
/var/folders/Kg/KgodBp6HFYaMgVoWCkGln+++mNU/-Tmp-/easy_install-p3img4/numpy-1.2.1/numpy/distutils/misc_util.py:1343: DeprecationWarning: os.popen4 is deprecated.  Use the subprocess module.<br>
sin, sout = os.popen4('svnversion')<br>
Traceback (most recent call last):<br>
File "/Library/Frameworks/Python.framework/Versions/Current/bin/easy_install", line 8, in <br>
load_entry_point('setuptools==0.6c9', 'console_scripts', 'easy_install')()<br>
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/setuptools/command/easy_install.py", line 1671, in main<br>
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/setuptools/command/easy_install.py", line 1659, in with_ei_usage<br>
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/setuptools/command/easy_install.py", line 1675, in <br>
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/core.py", line 152, in setup<br>
dist.run_commands()<br>
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/dist.py", line 975, in run_commands<br>
self.run_command(cmd)<br>
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/dist.py", line 995, in run_command<br>
cmd_obj.run()<br>
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/setuptools/command/easy_install.py", line 211, in run<br>
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/setuptools/command/easy_install.py", line 427, in easy_install<br>
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/setuptools/command/easy_install.py", line 478, in install_item<br>
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/setuptools/command/easy_install.py", line 519, in process_distribution<br>
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/pkg_resources.py", line 522, in resolve<br>
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/pkg_resources.py", line 758, in best_match<br>
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/pkg_resources.py", line 770, in obtain<br>
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/setuptools/command/easy_install.py", line 446, in easy_install<br>
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/setuptools/command/easy_install.py", line 476, in install_item<br>
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/setuptools/command/easy_install.py", line 655, in install_eggs<br>
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/setuptools/command/easy_install.py", line 930, in build_and_install<br>
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/setuptools/command/easy_install.py", line 919, in run_setup<br>
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/setuptools/sandbox.py", line 27, in run_setup<br>
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/setuptools/sandbox.py", line 63, in run<br>
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/setuptools/sandbox.py", line 29, in <br>
File "setup.py", line 96, in </p>
<p dir="auto">File "setup.py", line 89, in setup_package</p>
<p dir="auto">File "/var/folders/Kg/KgodBp6HFYaMgVoWCkGln+++mNU/-Tmp-/easy_install-p3img4/numpy-1.2.1/numpy/distutils/core.py", line 150, in setup<br>
File "setup.py", line 56, in configuration</p>
<p dir="auto">File "/var/folders/Kg/KgodBp6HFYaMgVoWCkGln+++mNU/-Tmp-/easy_install-p3img4/numpy-1.2.1/numpy/distutils/misc_util.py", line 851, in add_subpackage<br>
File "/var/folders/Kg/KgodBp6HFYaMgVoWCkGln+++mNU/-Tmp-/easy_install-p3img4/numpy-1.2.1/numpy/distutils/misc_util.py", line 834, in get_subpackage<br>
File "/var/folders/Kg/KgodBp6HFYaMgVoWCkGln+++mNU/-Tmp-/easy_install-p3img4/numpy-1.2.1/numpy/distutils/misc_util.py", line 781, in _get_configuration_from_setup_py<br>
File "numpy/setup.py", line 8, in configuration<br>
import os<br>
File "/var/folders/Kg/KgodBp6HFYaMgVoWCkGln+++mNU/-Tmp-/easy_install-p3img4/numpy-1.2.1/numpy/distutils/misc_util.py", line 851, in add_subpackage<br>
File "/var/folders/Kg/KgodBp6HFYaMgVoWCkGln+++mNU/-Tmp-/easy_install-p3img4/numpy-1.2.1/numpy/distutils/misc_util.py", line 834, in get_subpackage<br>
File "/var/folders/Kg/KgodBp6HFYaMgVoWCkGln+++mNU/-Tmp-/easy_install-p3img4/numpy-1.2.1/numpy/distutils/misc_util.py", line 781, in _get_configuration_from_setup_py<br>
File "/private/var/folders/Kg/KgodBp6HFYaMgVoWCkGln+++mNU/-Tmp-/easy_install-p3img4/numpy-1.2.1/numpy/f2py/setup.py", line 81, in configuration</p>
<p dir="auto">File "/var/folders/Kg/KgodBp6HFYaMgVoWCkGln+++mNU/-Tmp-/easy_install-p3img4/numpy-1.2.1/numpy/distutils/misc_util.py", line 1239, in add_scripts<br>
AttributeError: 'NoneType' object has no attribute 'extend'</p>
<p dir="auto"><em>Original ticket <a href="http://projects.scipy.org/numpy/ticket/860" rel="nofollow">http://projects.scipy.org/numpy/ticket/860</a> on 2008-07-24 by trac user phsilva, assigned to <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/dmcooke/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/dmcooke">@dmcooke</a>.</em></p>
<p dir="auto">Numpy 1.1.0 works well with easy_install if called from command line, like:</p>
<p dir="auto">easy_install numpy==1.1.0</p>
<p dir="auto">BUT, if I declare numpy==1.1.0 as a dependency in my setup.py setup() function, then I got this error (actually I get the same errors with Numpy 1.0.4):</p>
<p dir="auto">Traceback (most recent call last):<br>
File "setup.py", line 116, in <br>
platforms        = <em>chimera_platform</em>)<br>
File "/usr/lib/python2.5/distutils/core.py", line 151, in setup<br>
dist.run_commands()<br>
File "/usr/lib/python2.5/distutils/dist.py", line 974, in run_commands<br>
self.run_command(cmd)<br>
File "/usr/lib/python2.5/distutils/dist.py", line 994, in run_command<br>
cmd_obj.run()<br>
File "/usr/lib/python2.5/site-packages/setuptools-0.6c8-py2.5.egg/setuptools/command/develop.py", line 27, in run<br>
File "/usr/lib/python2.5/site-packages/setuptools-0.6c8-py2.5.egg/setuptools/command/develop.py", line 102, in install_for_development<br>
File "/usr/lib/python2.5/site-packages/easy_install.py", line 519, in process_distribution</p>
<p dir="auto">File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 522, in resolve<br>
dist = best[req.key] = env.best_match(req, self, installer)<br>
File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 758, in best_match<br>
return self.obtain(req, installer) # try and download/install<br>
File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 770, in obtain<br>
return installer(requirement)<br>
File "/usr/lib/python2.5/site-packages/easy_install.py", line 446, in easy_install</p>
<p dir="auto">File "/usr/lib/python2.5/site-packages/easy_install.py", line 476, in install_item</p>
<p dir="auto">File "/usr/lib/python2.5/site-packages/easy_install.py", line 655, in install_eggs</p>
<p dir="auto">File "/usr/lib/python2.5/site-packages/easy_install.py", line 930, in build_and_install</p>
<p dir="auto">File "/usr/lib/python2.5/site-packages/easy_install.py", line 919, in run_setup</p>
<p dir="auto">File "/usr/lib/python2.5/site-packages/setuptools-0.6c8-py2.5.egg/setuptools/sandbox.py", line 27, in run_setup<br>
File "/usr/lib/python2.5/site-packages/setuptools-0.6c8-py2.5.egg/setuptools/sandbox.py", line 63, in run<br>
File "/usr/lib/python2.5/site-packages/setuptools-0.6c8-py2.5.egg/setuptools/sandbox.py", line 29, in <br>
File "setup.py", line 96, in <br>
"numpy == 1.1.0",<br>
File "setup.py", line 89, in setup_package<br>
"Elixir &gt;= 0.5.2",<br>
File "/tmp/easy_install-kOtWpP/numpy-1.1.0/numpy/distutils/core.py", line 150, in setup<br>
File "setup.py", line 56, in configuration<br>
# setup<br>
File "/tmp/easy_install-kOtWpP/numpy-1.1.0/numpy/distutils/misc_util.py", line 839, in add_subpackage<br>
File "/tmp/easy_install-kOtWpP/numpy-1.1.0/numpy/distutils/misc_util.py", line 822, in get_subpackage<br>
File "/tmp/easy_install-kOtWpP/numpy-1.1.0/numpy/distutils/misc_util.py", line 769, in _get_configuration_from_setup_py<br>
File "/home/henrique/work/chimera/chimera/setup.py", line 9, in configuration<br>
# as published by the Free Software Foundation; either version 2<br>
File "/tmp/easy_install-kOtWpP/numpy-1.1.0/numpy/distutils/misc_util.py", line 839, in add_subpackage<br>
File "/tmp/easy_install-kOtWpP/numpy-1.1.0/numpy/distutils/misc_util.py", line 822, in get_subpackage<br>
File "/tmp/easy_install-kOtWpP/numpy-1.1.0/numpy/distutils/misc_util.py", line 769, in _get_configuration_from_setup_py<br>
File "/home/henrique/work/chimera/chimera/setup.py", line 223, in configuration</p>
<p dir="auto">File "/tmp/easy_install-kOtWpP/numpy-1.1.0/numpy/distutils/misc_util.py", line 1039, in add_include_dirs<br>
AttributeError: 'NoneType' object has no attribute 'extend'</p>
<p dir="auto">This seems similar to issue <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="7723701" data-permission-text="Title is private" data-url="https://github.com/numpy/numpy/issues/679" data-hovercard-type="issue" data-hovercard-url="/numpy/numpy/issues/679/hovercard" href="https://github.com/numpy/numpy/issues/679">#679</a>. Numpy distutils was expecting something which setuptools distutils (only in dependency mode) overrides and throw away.</p>
<p dir="auto">Follows a patch/hack against 1.1.0 that worked to me (for 1.0.4 it's just the same hack on different chunck).</p>
<p dir="auto">What the plan for distutils based installers (like setuptools) when numscons became the default? I'm not going to integrate my package in distribution yet, so I'm using easy_install which seems to be the easiest solution available. Any other idea about how to distribute Numpy? I was thinking about try to create an egg, but then I'll need to have one for each different setup (distro/arch) that I would like to use, right?</p>
<p dir="auto">Thanks a lot, and congrats for the great work with Numpy!</p>