[SciPy-dev] scipy import failures, what can we do about it?
pearu at cens.ioc.ee
Tue Feb 26 10:41:16 CST 2002
I have several times noticed that if scipy import fails then it shows
1) unrelated error messages and 2) the corresponding message of the true
reason of the failure is either hidden or presented in an unnoticable
way. The following message illustrates a particular case of all that:
---------- Forwarded message ----------
Date: Tue, 26 Feb 2002 15:43:04 +0100
From: Nils Wagner <nwagner at mecha.uni-stuttgart.de>
Reply-To: scipy-user at scipy.org
To: "scipy-user at scipy.net" <scipy-user at scipy.net>
Subject: [SciPy-user] Latest CVS - import scipy fails
>>> import scipy
undefined symbol: clapack_sgetrf
^^^^^^^^^^^^^^^ - this is the true reason for import failure
Warning: FFT package not found. Some names will not be available
^^^^^^^^^^^^^^^ - this warning is completely wrong. As a result, the
FFT package gets a bad name that it does not serve (I a bit suspect that
this is what happend to fftw).
Traceback (most recent call last):
ImportError: cannot import name eig
^^^^^^^^^^^^^ - the exception raised here is not related to the true
import error above and one may start looking for errors in wrong places.
My suggesion is to review how scipy imports its submodules. Though the
current one may work perfectly if nothing is wrong but it behaves
unpredictable if something *is* wrong. Scipy should be able to fail at
least with a sensible message indicating the right direction to look for
errors. The current error messages are just too misleading.
If we will not fix this, we are going to get continuously scipy import
failure reports that have very little to do with scipy bugs, the failures
are more likely to be of incorrectly installed third-party libraries
like atlas, fftw, etc.
Currently, I don't have a good solution to suggest that would
transparently fix all the importing issues. However, I would like to learn
what others feel about this issue so that I could know if it makes sense
to work something out or not (may be some of you already have a good
More information about the Scipy-dev