[SciPy-user] SciPy autotester fails on pilutil
Tanja Gurzhiy
tanja.gurzhiy at gmail.com
Wed May 6 11:05:12 EDT 2009
Hi all,
I am currently busy with SciPy 0.7.0 installation (I have NumPy v1.3.0
installed and PIL v).
If I run the scipy autotester (scipy.test()), I get the failure in testcase
from scipy.misc
ERROR: Failure: ImportError (No module named Image)
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/scratch/sources/numpy/nose-0.10.4-install/lib/python2.5/site-packages/nose/loader.py",
line 364, in loadTestsFromName addr.filename, addr.module)
File
"/scratch/sources/numpy/nose-0.10.4-install/lib/python2.5/site-packages/nose/importer.py",
line 39, in importFromPath return self.importFromDir(dir_path, fqname)
File
"/scratch/sources/numpy/nose-0.10.4-install/lib/python2.5/site-packages/nose/importer.py",
line 84, in importFromDir mod = load_module(part_fqname, fh, filename,
desc)
File "/home/tgurzhiy/cadlib/scipy/misc/tests/test_pilutil.py", line 12, in
<module>
import scipy.misc.pilutil as pilutil
File
"/cadappl/python_scipy/0.7.0/python_scipy/lib/python2.5/site-packages/scipy/misc/pilutil.py",
line 10, in <module> import Image
ImportError: No module named Image
In pilutil.py line 10 use import Image, the module Image is located in PIL.
In my case PYTHONPATH includes only directory (~/cadlib) that includes PIL,
NumPy, matloptlib and SciPy therefore module Image cannot be imported
directly if scipy.test() is ran.
As consequences of this error in pilutil, the functions from this file
cannot be used (e.g., imread, imshow, etc.)
>>> from scipy import misc
>>> im = misc.lena()
>>> im.shape
(512, 512)
>>> im1= misc.imresize(im,1.1)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'imresize'
Why scipy/misc/pilutil.py uses direct import Image and not import PIL.Image?
The work-around could be to update my PYTHONPATH with ~/cadlib/PIL , but I
think it is not what should be done. Correct me if I am wrong.
Best regards,
Tanja Gurzhiy
Please find below the information about my system, platform, etc.
'from numpy.f2py.diagnose import run; run()
os.name='posix'
------
sys.platform='sunos5'
------
sys.version:
2.5.1 (r251:54863, Aug 6 2008, 14:27:55)
[GCC 3.4.3]
------
sys.prefix:
/home/tgurzhiy/.caddata/python/python
------
sys.path='/usr/local/asm::/home/tgurzhiy/cadlib:/usr/local/asm/lib/python:/usr/local/asm/bin/python:/scratch/sources/numpy/nose-0.10.4-install/lib/python2.5/site-packages:/home/tgurzhiy/.caddata/python/python/lib/python25.zip:/home/tgurzhiy/.caddata/python/python/lib/python2.5:/home/tgurzhiy/.caddata/python/python/lib/python2.5/plat-sunos5:/home/tgurzhiy/.caddata/python/python/lib/python2.5/lib-tk:/home/tgurzhiy/.caddata/python/python/lib/python2.5/lib-dynload:/home/tgurzhiy/.caddata/python/python/lib/python2.5/site-packages'
------
Failed to import Numeric: No module named Numeric
Failed to import numarray: No module named numarray
Found new numpy version '1.3.0' in /home/tgurzhiy/cadlib/numpy/__init__.pyc
Found f2py2e version '2' in /home/tgurzhiy/cadlib/numpy/f2py/f2py2e.pyc
Found numpy.distutils version '0.4.0' in
'/home/tgurzhiy/cadlib/numpy/distutils/__init__.pyc'
------
Importing numpy.distutils.fcompiler ... ok
------
Checking availability of supported Fortran compilers:
GnuFCompiler instance properties:
archiver = ['/home/tgurzhiy/cadbin/g77', '-cr']
compile_switch = '-c'
compiler_f77 = ['/home/tgurzhiy/cadbin/g77', '-g', '-Wall', '-fno-
second-underscore', '-fPIC', '-O3', '-funroll-loops']
compiler_f90 = None
compiler_fix = None
libraries = ['g2c']
library_dirs = ['/home/cadappl/gcc/3.4.3/gcc/bin/../lib/gcc/sparc-sun-
solaris2.8/3.4.3']
linker_exe = ['/home/tgurzhiy/cadbin/g77', '-g', '-Wall', '-g', '-
Wall']
linker_so = ['/home/tgurzhiy/cadbin/g77', '-g', '-Wall', '-g', '-
Wall', '-shared', '-mimpure-text']
object_switch = '-o '
ranlib = ['/home/tgurzhiy/cadbin/g77']
version = LooseVersion ('3.4.3')
version_cmd = ['/home/tgurzhiy/cadbin/g77', '--version']
Fortran compilers found:
--fcompiler=gnu GNU Fortran 77 compiler (3.4.3)
Compilers available for this platform, but not found:
--fcompiler=g95 G95 Fortran Compiler
--fcompiler=gnu95 GNU Fortran 95 compiler
--fcompiler=sun Sun or Forte Fortran 95 Compiler
Compilers not available on this platform:
--fcompiler=absoft Absoft Corp Fortran Compiler
--fcompiler=compaq Compaq Fortran Compiler
--fcompiler=hpux HP Fortran 90 Compiler
--fcompiler=ibm IBM XL Fortran Compiler
--fcompiler=intel Intel Fortran Compiler for 32-bit apps
--fcompiler=intele Intel Fortran Compiler for Itanium apps
--fcompiler=intelem Intel Fortran Compiler for EM64T-based apps
--fcompiler=intelev Intel Visual Fortran Compiler for Itanium apps
--fcompiler=intelv Intel Visual Fortran Compiler for 32-bit apps
--fcompiler=lahey Lahey/Fujitsu Fortran 95 Compiler
--fcompiler=mips MIPSpro Fortran Compiler
--fcompiler=nag NAGWare Fortran 95 Compiler
--fcompiler=none Fake Fortran compiler
--fcompiler=pg Portland Group Fortran Compiler
--fcompiler=vast Pacific-Sierra Research Fortran 90 Compiler
For compiler details, run 'config_fc --verbose' setup command.
------
Importing numpy.distutils.cpuinfo ... ok
------
CPU information: CPUInfoBase__get_nbits getNCPUs is_32bit is_cpusparcv9
is_sparcv9 is_sun4 ------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20090506/4e848652/attachment.html>
More information about the SciPy-User
mailing list