From: rex <re...@no...> - 2006-08-28 14:37:31
|
Numpy builds, but fails to run with the error message: > python Python 2.4.2 (#1, Apr 24 2006, 18:13:30) [GCC 4.1.0 (SUSE 10.1 Linux)] on linux2 >>> import numpy Traceback (most recent call last): File "<stdin>", line 1, in ? File "/usr/lib/python2.4/site-packages/numpy/__init__.py", line 35, in ? import core File "/usr/lib/python2.4/site-packages/numpy/core/__init__.py", line 5, in ? import multiarray ImportError: /usr/lib/python2.4/site-packages/numpy/core/multiarray.so: undefined symbol: PyUnicodeUCS2_FromUnicode Build was without BLAS or LAPACK. Results were the same when Intel MKL was used. python setup.py install >& inst.log Running from numpy source directory. non-existing path in 'numpy/distutils': 'site.cfg' F2PY Version 2_3078 blas_opt_info: blas_mkl_info: libraries mkl,vml,guide not found in /usr/local/lib libraries mkl,vml,guide not found in /usr/lib NOT AVAILABLE [...] running install running build running config_fc running build_src building py_modules sources building extension "numpy.core.multiarray" sources adding 'build/src.linux-i686-2.4/numpy/core/config.h' to sources. executing numpy/core/code_generators/generate_array_api.py adding 'build/src.linux-i686-2.4/numpy/core/__multiarray_api.h' to sources. adding 'build/src.linux-i686-2.4/numpy/core/src' to include_dirs. numpy.core - nothing done with h_files= ['build/src.linux-i686-2.4/numpy/core/src/scalartypes .inc', 'build/src.linux-i686-2.4/numpy/core/src/arraytypes.inc', 'build/src.linux-i686-2.4/nu mpy/core/config.h', 'build/src.linux-i686-2.4/numpy/core/__multiarray_api.h'] building extension "numpy.core.umath" sources adding 'build/src.linux-i686-2.4/numpy/core/config.h' to sources. executing numpy/core/code_generators/generate_ufunc_api.py adding 'build/src.linux-i686-2.4/numpy/core/__ufunc_api.h' to sources. adding 'build/src.linux-i686-2.4/numpy/core/src' to include_dirs. numpy.core - nothing done with h_files= ['build/src.linux-i686-2.4/numpy/core/src/scalartypes .inc', 'build/src.linux-i686-2.4/numpy/core/src/arraytypes.inc', 'build/src.linux-i686-2.4/nu mpy/core/config.h', 'build/src.linux-i686-2.4/numpy/core/__ufunc_api.h'] building extension "numpy.core._sort" sources adding 'build/src.linux-i686-2.4/numpy/core/config.h' to sources. executing numpy/core/code_generators/generate_array_api.py adding 'build/src.linux-i686-2.4/numpy/core/__multiarray_api.h' to sources. numpy.core - nothing done with h_files= ['build/src.linux-i686-2.4/numpy/core/config.h', 'bui ld/src.linux-i686-2.4/numpy/core/__multiarray_api.h'] building extension "numpy.core.scalarmath" sources adding 'build/src.linux-i686-2.4/numpy/core/config.h' to sources. executing numpy/core/code_generators/generate_array_api.py adding 'build/src.linux-i686-2.4/numpy/core/__multiarray_api.h' to sources. executing numpy/core/code_generators/generate_ufunc_api.py adding 'build/src.linux-i686-2.4/numpy/core/__ufunc_api.h' to sources. numpy.core - nothing done with h_files= ['build/src.linux-i686-2.4/numpy/core/config.h', 'bui ld/src.linux-i686-2.4/numpy/core/__multiarray_api.h', 'build/src.linux-i686-2.4/numpy/core/__ ufunc_api.h'] building extension "numpy.core._dotblas" sources building extension "numpy.lib._compiled_base" sources building extension "numpy.numarray._capi" sources building extension "numpy.fft.fftpack_lite" sources building extension "numpy.linalg.lapack_lite" sources ### Warning: Using unoptimized lapack ### adding 'numpy/linalg/lapack_litemodule.c' to sources. adding 'numpy/linalg/zlapack_lite.c' to sources. adding 'numpy/linalg/dlapack_lite.c' to sources. adding 'numpy/linalg/blas_lite.c' to sources. adding 'numpy/linalg/dlamch.c' to sources. adding 'numpy/linalg/f2c_lite.c' to sources. building extension "numpy.random.mtrand" sources Could not locate executable f95 customize GnuFCompiler customize GnuFCompiler customize GnuFCompiler using config ******************************************************************************************* C compiler: gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC compile options: '-Inumpy/core/src -Inumpy/core/include -I/usr/include/python2.4 -c' gcc: _configtest.c _configtest.c:7:2: error: #error No _WIN32 _configtest.c:7:2: error: #error No _WIN32 failure. removing: _configtest.c _configtest.o ******************************************************************************************* building data_files sources [...] changing mode of /usr/bin/f2py to 755 running install_data copying build/src.linux-i686-2.4/numpy/core/__multiarray_api.h -> /usr/lib/python2.4/site-pac kages/numpy/core/include/numpy copying build/src.linux-i686-2.4/numpy/core/multiarray_api.txt -> /usr/lib/python2.4/site-pac kages/numpy/core/include/numpy copying build/src.linux-i686-2.4/numpy/core/__ufunc_api.h -> /usr/lib/python2.4/site-packages /numpy/core/include/numpy copying build/src.linux-i686-2.4/numpy/core/ufunc_api.txt -> /usr/lib/python2.4/site-packages /numpy/core/include/numpy Any pointers would be much appreciated. This isn't the first time I've spent days trying to get SciPy built under SUSE... :( -rex |
From: Travis O. <oli...@ie...> - 2006-08-28 19:33:59
|
rex wrote: > Numpy builds, but fails to run with the error message: > > >> python >> > Python 2.4.2 (#1, Apr 24 2006, 18:13:30) > [GCC 4.1.0 (SUSE 10.1 Linux)] on linux2 > >>>> import numpy >>>> > Traceback (most recent call last): > File "<stdin>", line 1, in ? > File "/usr/lib/python2.4/site-packages/numpy/__init__.py", line 35, in ? > import core > File "/usr/lib/python2.4/site-packages/numpy/core/__init__.py", line 5, in ? > import multiarray > ImportError: /usr/lib/python2.4/site-packages/numpy/core/multiarray.so: undefined symbol: PyUnicodeUCS2_FromUnicode > > > This error usually means that NumPy was built and linked against a Python build where unicode strings were 2-bytes per character but you are trying to import it on a Python build where unicode strings are 4-bytes per character. Perhaps you have changed your build of Python and did not remove the build directory of NumPy. Try rm -fr build in the numpy directory (where you run setup.py) and build again. You can tell how many bytes-per-unicode character your system is built with by looking at the output of sys.maxunicode |
From: rex <re...@no...> - 2006-08-28 20:53:05
|
Travis Oliphant <oli...@ie...> [2006-08-28 12:42]: > rex wrote: > > ImportError: /usr/lib/python2.4/site-packages/numpy/core/multiarray.so: undefined symbol: PyUnicodeUCS2_FromUnicode > > > > > > > > This error usually means that NumPy was built and linked against a > Python build where unicode strings were 2-bytes per character but you > are trying to import it on a Python build where unicode strings are > 4-bytes per character. Perhaps you have changed your build of Python > and did not remove the build directory of NumPy. > > Try > > rm -fr build > > in the numpy directory (where you run setup.py) and build again. Ah! THANK YOU! Python 2.4.2 (#1, May 2 2006, 08:13:46) [GCC 4.1.0 (SUSE Linux)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import numpy >>> numpy.test() Found 5 tests for numpy.distutils.misc_util Found 3 tests for numpy.lib.getlimits Found 31 tests for numpy.core.numerictypes Found 32 tests for numpy.linalg Found 13 tests for numpy.core.umath Found 4 tests for numpy.core.scalarmath Found 8 tests for numpy.lib.arraysetops Found 42 tests for numpy.lib.type_check Found 155 tests for numpy.core.multiarray Found 3 tests for numpy.fft.helper Found 36 tests for numpy.core.ma Found 10 tests for numpy.lib.twodim_base Found 10 tests for numpy.core.defmatrix Found 1 tests for numpy.lib.ufunclike Found 4 tests for numpy.ctypeslib Found 39 tests for numpy.lib.function_base Found 1 tests for numpy.lib.polynomial Found 8 tests for numpy.core.records Found 26 tests for numpy.core.numeric Found 4 tests for numpy.lib.index_tricks Found 46 tests for numpy.lib.shape_base Found 0 tests for __main__ ---------------------------------------------------------------------- Ran 481 tests in 1.956s OK Now on to doing it again with MKL... >From the numpy directory: rm -fr build cp site_mkl.cfg site.cfg where site_mkl.cfg is: ----------------------------------------------------------------------- [DEFAULT] library_dirs=/opt/intel/mkl/8.1/lib/32 include_dirs=/opt/intel/mkl/8.1/include [blas_opt] libraries=libmkl.so,libmkl_p3.so,libmkl_vml_p3.so,libmkl_ia32.a,libguide.so,libmkl_def.so #libraries=whatever_the_mkl_blas_lib_is,mkl_ia32,mkl,guide [lapack_opt] libraries=libmkl_lapack32.so,libmkl_lapack.a, #libraries=mkl_lapack,mkl_lapack32,mkl_ia32,mkl,guide ---------------------------------------------------------------------- python setup.py install >& inst.log Looks OK, so in another window: python Python 2.4.2 (#1, May 2 2006, 08:13:46) [GCC 4.1.0 (SUSE Linux)] on linux2 >>> import numpy Traceback (most recent call last): File "<stdin>", line 1, in ? File "/usr/lib/python2.4/site-packages/numpy/__init__.py", line 39, in ? import linalg File "/usr/lib/python2.4/site-packages/numpy/linalg/__init__.py", line 4, in ? from linalg import * File "/usr/lib/python2.4/site-packages/numpy/linalg/linalg.py", line 25, in ? from numpy.linalg import lapack_lite ImportError: libmkl_lapack32.so: cannot open shared object file: No such file or directory >>> Oops! ^d export INCLUDE=/opt/intel/mkl/8.1/include:$INCLUDE export LD_LIBRARY_PATH=/opt/intel/mkl/8.1/lib/32:$LD_LIBRARY_PATH python Python 2.4.2 (#1, May 2 2006, 08:13:46) [GCC 4.1.0 (SUSE Linux)] on linux2 >>> import numpy >>> numpy.test() Found 5 tests for numpy.distutils.misc_util Found 3 tests for numpy.lib.getlimits Found 31 tests for numpy.core.numerictypes Found 32 tests for numpy.linalg Found 13 tests for numpy.core.umath Found 4 tests for numpy.core.scalarmath Found 8 tests for numpy.lib.arraysetops Found 42 tests for numpy.lib.type_check Found 155 tests for numpy.core.multiarray Found 3 tests for numpy.fft.helper Found 36 tests for numpy.core.ma Found 10 tests for numpy.lib.twodim_base Found 10 tests for numpy.core.defmatrix Found 1 tests for numpy.lib.ufunclike Found 4 tests for numpy.ctypeslib Found 39 tests for numpy.lib.function_base Found 1 tests for numpy.lib.polynomial Found 8 tests for numpy.core.records Found 26 tests for numpy.core.numeric Found 4 tests for numpy.lib.index_tricks Found 46 tests for numpy.lib.shape_base Found 0 tests for __main__ ---------------------------------------------------------------------- Ran 481 tests in 2.152s OK Now off to build SciPy. Thanks again! -rex |