[Numpy-discussion] numpy distutils log error with easy_install
Wed Oct 3 16:29:21 CDT 2012
On Wed, Oct 3, 2012 at 10:17 PM, Ralf Gommers <firstname.lastname@example.org> wrote:
> On Mon, Oct 1, 2012 at 10:47 PM, Matthew Brett <email@example.com>
>> On Mon, Oct 1, 2012 at 9:42 PM, Matthew Brett <firstname.lastname@example.org>
>> > Hi,
>> > One of our kind users pointed out an error when using easy_install to
>> > install our package nipy. I've reproduced it now on a bare package
>> > using numpy distutils and having a trivial extension:
>> > https://github.com/matthew-brett/apkg
>> > To reproduce:
>> > git clone git://github.com/mathew-brett/apkg.git
>> > easy_install apkg
>> > You should get something like this:
>> > Processing apkg
>> > Running setup.py -q bdist_egg --dist-dir
>> > /home/mb312/tmp/apkg/egg-dist-tmp-T5yjuB
>> > Appending apkg configuration to
>> > Ignoring attempt to set 'name' (from '' to 'apkg')
>> > zip_safe flag not set; analyzing archive contents...
>> > Adding apkg 0.1 to easy-install.pth file
>> > Installed
>> > /home/mb312/.virtualenvs/np-1.6.2/lib/python2.6/site-packages/apkg-0.1-py2.6-linux-i686.egg
>> > Processing dependencies for apkg==0.1
>> > Finished processing dependencies for apkg==0.1
>> > /home/mb312/.virtualenvs/np-1.6.2/lib/python2.6/site-packages/numpy/distutils/misc_util.py:252:
>> > RuntimeWarning: Parent module 'numpy.distutils' not found while
>> > handling absolute import
>> > from numpy.distutils import log
>> > Note the last error.
>> Sorry, correcting myself - it's (obviously) a Warning rather than an
>> error, but still distracting, and it would be good to avoid it if
> The combination of two or all of atexit.register, easy_install and
> virtualenv seems to be causing this. Unless someone feels like digging into
> that (I certainly don't), there are two easy solutions:
> 1. Silence the warning.
Sorry - I am not sure what you mean. The problem here is the user who
assumes that something bad happened when running easy_install - which
is what happened in the case of nipy. Is there some way of silencing
this (specific) warning from within setup.py?
> 2. Remove the offending import and the logging. This will only remove the
> line "removing: _configtest.c _configtest.o" from the build log (x20).
Which import did you mean? I think I need all the imports I'm using
in the example minimal package. I'm not explicitly importing logging
Thanks for looking into it...
More information about the NumPy-Discussion