Installation SciPy

Probleme bei der Installation?
Benutzeravatar
tromai
User
Beiträge: 92
Registriert: Mittwoch 26. April 2006, 11:20

Installation SciPy

Beitragvon tromai » Montag 15. Mai 2006, 12:12

Hallo,

ich habe einige Probleme SciPy zu installieren. Die obige Anleitung hat mir nicht weitergeholfen. Aber vielleicht habe ich auch einfach etwas überlesen oder meine spärlichen Linux-Kenntnisse lassen mich die wahrscheinlich relativ einfache Lösung nicht erkennen.

Ich habe zuerst FFTW3, LAPACK und BLAS installiert (RPMs). Ich gehe davon aus, dass das funktioniert hat, da keine Fehlermeldung erschienen ist. Die Umgebungsvariablen habe ich gesetzt.

Als nächstes habe ich NumPy installiert. Hier der output bei der Installation.

[code=]maik@ewcgis:~/install/numpy-0.9.6> sudo python setup.py install
Running from numpy source directory.
Warning: not existing path in numpy/distutils: site.cfg
F2PY Version 2_2236
blas_opt_info:
blas_mkl_info:
/home/maik/install/numpy-0.9.6/numpy/distutils/system_info.py:531: UserWarning: Library error: libs=['mkl', 'vml', 'guide'] found_libs=[]
warnings.warn("Library error: libs=%s found_libs=%s" % \
NOT AVAILABLE

atlas_blas_threads_info:
Setting PTATLAS=ATLAS
/home/maik/install/numpy-0.9.6/numpy/distutils/system_info.py:531: UserWarning: Library error: libs=['ptf77blas', 'ptcblas', 'atlas'] found_libs=[]
warnings.warn("Library error: libs=%s found_libs=%s" % \
NOT AVAILABLE

atlas_blas_info:
/home/maik/install/numpy-0.9.6/numpy/distutils/system_info.py:531: UserWarning: Library error: libs=['f77blas', 'cblas', 'atlas'] found_libs=[]
warnings.warn("Library error: libs=%s found_libs=%s" % \
NOT AVAILABLE

/home/maik/install/numpy-0.9.6/numpy/distutils/system_info.py:1264: UserWarning:
Atlas (http://math-atlas.sourceforge.net/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [atlas]) or by setting
the ATLAS environment variable.
warnings.warn(AtlasNotFoundError.__doc__)
blas_info:
Replacing _lib_names[0]=='blas' with 'blas'
Replacing _lib_names[0]=='blas' with 'blas'
FOUND:
libraries = ['blas']
library_dirs = ['/usr/lib64']
language = f77

FOUND:
libraries = ['blas']
library_dirs = ['/usr/lib64']
define_macros = [('NO_ATLAS_INFO', 1)]
language = f77

lapack_opt_info:
lapack_mkl_info:
mkl_info:
NOT AVAILABLE

NOT AVAILABLE

atlas_threads_info:
Setting PTATLAS=ATLAS
/home/maik/install/numpy-0.9.6/numpy/distutils/system_info.py:531: UserWarning: Library error: libs=['lapack_atlas'] found_libs=[]
warnings.warn("Library error: libs=%s found_libs=%s" % \
numpy.distutils.system_info.atlas_threads_info
NOT AVAILABLE

atlas_info:
numpy.distutils.system_info.atlas_info
NOT AVAILABLE

/home/maik/install/numpy-0.9.6/numpy/distutils/system_info.py:1183: UserWarning:
Atlas (http://math-atlas.sourceforge.net/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [atlas]) or by setting
the ATLAS environment variable.
warnings.warn(AtlasNotFoundError.__doc__)
lapack_info:
Replacing _lib_names[0]=='lapack' with 'lapack'
/home/maik/install/numpy-0.9.6/numpy/distutils/system_info.py:531: UserWarning: Library error: libs=['lapack'] found_libs=[]
warnings.warn("Library error: libs=%s found_libs=%s" % \
Replacing _lib_names[0]=='lapack' with 'lapack'
FOUND:
libraries = ['lapack']
library_dirs = ['/usr/lib64']
language = f77

FOUND:
libraries = ['lapack', 'blas']
library_dirs = ['/usr/lib64']
define_macros = [('NO_ATLAS_INFO', 1)]
language = f77

running install
running build
running config_fc
running build_src
building py_modules sources
building extension "numpy.core.multiarray" sources
adding 'build/src/numpy/core/config.h' to sources.
adding 'build/src/numpy/core/__multiarray_api.h' to sources.
adding 'build/src/numpy/core/src' to include_dirs.
numpy.core - nothing done with h_files= ['build/src/numpy/core/src/scalartypes.inc', 'build/src/numpy/core/src/arraytypes.inc', 'build/src/numpy/core/config.h', 'build/src/numpy/core/__multiarray_api.h']
building extension "numpy.core.umath" sources
adding 'build/src/numpy/core/config.h' to sources.
adding 'build/src/numpy/core/__ufunc_api.h' to sources.
adding 'build/src/numpy/core/src' to include_dirs.
numpy.core - nothing done with h_files= ['build/src/numpy/core/src/scalartypes.inc', 'build/src/numpy/core/src/arraytypes.inc', 'build/src/numpy/core/config.h', 'build/src/numpy/core/__ufunc_api.h']
building extension "numpy.core._sort" sources
adding 'build/src/numpy/core/config.h' to sources.
adding 'build/src/numpy/core/__multiarray_api.h' to sources.
numpy.core - nothing done with h_files= ['build/src/numpy/core/config.h', 'build/src/numpy/core/__multiarray_api.h']
building extension "numpy.core._dotblas" sources
adding 'numpy/core/blasdot/_dotblas.c' to sources.
building extension "numpy.lib._compiled_base" sources
building extension "numpy.dft.fftpack_lite" sources
building extension "numpy.linalg.lapack_lite" sources
adding 'numpy/linalg/lapack_litemodule.c' to sources.
building extension "numpy.random.mtrand" sources
Could not locate executable gfortran
Could not locate executable f95
customize GnuFCompiler
customize GnuFCompiler
customize GnuFCompiler using config
gcc options: '-pthread -fno-strict-aliasing -DNDEBUG -DHAVE_LARGEFILE_SUPPORT -O2 -fmessage-length=0 -Wall -fPIC'
compile options: '-Inumpy/core/src -Inumpy/core/include -I/usr/include/python2.3 -c'
gcc: _configtest.c
_configtest.c:7:2: #error No _WIN32
_configtest.c:7:2: #error No _WIN32
failure.
removing: _configtest.c _configtest.o
building data_files sources
running build_py
copying build/src/numpy/__config__.py -> build/lib.linux-x86_64-2.3/numpy
copying build/src/numpy/distutils/__config__.py -> build/lib.linux-x86_64-2.3/numpy/distutils
running build_ext
customize UnixCCompiler
customize UnixCCompiler using build_ext
customize GnuFCompiler
customize GnuFCompiler
customize GnuFCompiler using build_ext
running build_scripts
adding 'build/scripts-2.3/f2py' to scripts
running install_lib
copying build/lib.linux-x86_64-2.3/numpy/distutils/__config__.py -> /usr/lib64/python2.3/site-packages/numpy/distutils
copying build/lib.linux-x86_64-2.3/numpy/__config__.py -> /usr/lib64/python2.3/site-packages/numpy
byte-compiling /usr/lib64/python2.3/site-packages/numpy/distutils/__config__.py to __config__.pyc
byte-compiling /usr/lib64/python2.3/site-packages/numpy/__config__.py to __config__.pyc
running install_scripts
changing mode of /usr/bin/f2py to 755
running install_data
[/code]

Ich habe es getestet und NumPy funktioniert.

Wenn ich jetzt scipy installiere kommen folgende Meldungen
[code=]maik@ewcgis:~/install/scipy-0.4.8> sudo python setup.py install
Password:
fft_opt_info:
fftw3_info:
/usr/lib64/python2.3/site-packages/numpy/distutils/system_info.py:531: UserWarning: Library error: libs=['fftw3'] found_libs=[]
warnings.warn("Library error: libs=%s found_libs=%s" % \
fftw3 not found
NOT AVAILABLE

fftw2_info:
/usr/lib64/python2.3/site-packages/numpy/distutils/system_info.py:531: UserWarning: Library error: libs=['rfftw', 'fftw'] found_libs=[]
warnings.warn("Library error: libs=%s found_libs=%s" % \
fftw2 not found
NOT AVAILABLE

dfftw_info:
/usr/lib64/python2.3/site-packages/numpy/distutils/system_info.py:531: UserWarning: Library error: libs=['drfftw', 'dfftw'] found_libs=[]
warnings.warn("Library error: libs=%s found_libs=%s" % \
dfftw not found
NOT AVAILABLE

djbfft_info:
NOT AVAILABLE

NOT AVAILABLE

blas_opt_info:
blas_mkl_info:
/usr/lib64/python2.3/site-packages/numpy/distutils/system_info.py:531: UserWarning: Library error: libs=['mkl', 'vml', 'guide'] found_libs=[]
warnings.warn("Library error: libs=%s found_libs=%s" % \
NOT AVAILABLE

atlas_blas_threads_info:
Setting PTATLAS=ATLAS
/usr/lib64/python2.3/site-packages/numpy/distutils/system_info.py:531: UserWarning: Library error: libs=['ptf77blas', 'ptcblas', 'atlas'] found_libs=[]
warnings.warn("Library error: libs=%s found_libs=%s" % \
NOT AVAILABLE

atlas_blas_info:
/usr/lib64/python2.3/site-packages/numpy/distutils/system_info.py:531: UserWarning: Library error: libs=['f77blas', 'cblas', 'atlas'] found_libs=[]
warnings.warn("Library error: libs=%s found_libs=%s" % \
NOT AVAILABLE

/usr/lib64/python2.3/site-packages/numpy/distutils/system_info.py:1264: UserWarning:
Atlas (http://math-atlas.sourceforge.net/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [atlas]) or by setting
the ATLAS environment variable.
warnings.warn(AtlasNotFoundError.__doc__)
blas_info:
/usr/lib64/python2.3/site-packages/numpy/distutils/system_info.py:531: UserWarning: Library error: libs=['blas'] found_libs=[]
warnings.warn("Library error: libs=%s found_libs=%s" % \
NOT AVAILABLE

/usr/lib64/python2.3/site-packages/numpy/distutils/system_info.py:1273: UserWarning:
Blas (http://www.netlib.org/blas/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [blas]) or by setting
the BLAS environment variable.
warnings.warn(BlasNotFoundError.__doc__)
blas_src_info:
NOT AVAILABLE

/usr/lib64/python2.3/site-packages/numpy/distutils/system_info.py:1276: UserWarning:
Blas (http://www.netlib.org/blas/) sources not found.
Directories to search for the sources can be specified in the
numpy/distutils/site.cfg file (section [blas_src]) or by setting
the BLAS_SRC environment variable.
warnings.warn(BlasSrcNotFoundError.__doc__)
Traceback (most recent call last):
File "setup.py", line 48, in ?
setup_package()
File "setup.py", line 34, in setup_package
config.add_subpackage('Lib')
File "/usr/lib64/python2.3/site-packages/numpy/distutils/misc_util.py", line 592, in add_subpackage
config_list = self.get_subpackage(subpackage_name,subpackage_path)
File "/usr/lib64/python2.3/site-packages/numpy/distutils/misc_util.py", line 582, in get_subpackage
subpackage_path)
File "/usr/lib64/python2.3/site-packages/numpy/distutils/misc_util.py", line 539, in _get_configuration_from_setup_py
config = setup_module.configuration(*args)
File "/home/maik/install/scipy-0.4.8/Lib/setup.py", line 7, in configuration
config.add_subpackage('integrate')
File "/usr/lib64/python2.3/site-packages/numpy/distutils/misc_util.py", line 592, in add_subpackage
config_list = self.get_subpackage(subpackage_name,subpackage_path)
File "/usr/lib64/python2.3/site-packages/numpy/distutils/misc_util.py", line 582, in get_subpackage
subpackage_path)
File "/usr/lib64/python2.3/site-packages/numpy/distutils/misc_util.py", line 539, in _get_configuration_from_setup_py
config = setup_module.configuration(*args)
File "Lib/integrate/setup.py", line 11, in configuration
blas_opt = get_info('blas_opt',notfound_action=2)
File "/usr/lib64/python2.3/site-packages/numpy/distutils/system_info.py", line 244, in get_info
return cl().get_info(notfound_action)
File "/usr/lib64/python2.3/site-packages/numpy/distutils/system_info.py", line 385, in get_info
raise self.notfounderror,self.notfounderror.__doc__
numpy.distutils.system_info.NotFoundError: Some third-party program or library is not found.[/code]

Vielleicht hat ja jemand eine Idee wo das Problem liegt.

Wird ATLAS eigentlich zwingend benötigt? Ich habe das zumindest nicht so verstanden.
antimicro
User
Beiträge: 151
Registriert: Sonntag 29. Februar 2004, 16:24

Beitragvon antimicro » Montag 15. Mai 2006, 22:51

Hi,
Probleme mit scipy? Da bin ich bei :D

Code: Alles auswählen

IDLE 1.1.3     
>>> import scipy

Traceback (most recent call last):
  File "<pyshell#0>", line 1, in -toplevel-
    import scipy
  File "C:\Python24\Lib\site-packages\scipy\__init__.py", line 34, in -toplevel-
    del linalg
NameError: name 'linalg' is not defined
>>>


Was hab ich wohl falsch gemacht?

Python 2.4.3
Numeric 24.2
scipy 0.4.8
WinXP SP2
greetings
sebi
Benutzeravatar
tromai
User
Beiträge: 92
Registriert: Mittwoch 26. April 2006, 11:20

Beitragvon tromai » Dienstag 16. Mai 2006, 09:51

Nach etwas längerer Recherche habe ich jetzt herausgefunden, dass die Suse RPMs für LAPACK und BLAS scheinbar nicht vollständig sind :roll: . Also nochmal alles von vorne :?
Benutzeravatar
tromai
User
Beiträge: 92
Registriert: Mittwoch 26. April 2006, 11:20

Beitragvon tromai » Donnerstag 18. Mai 2006, 10:07

ich habe es jetzt mal mit Atlas versucht. Das Resultat ist, dass er jetzt auch die installation von NumPy nicht mehr durchläuft.

[code=]Running from numpy source directory.
Warning: not existing path in numpy/distutils: site.cfg
F2PY Version 2_2236
blas_opt_info:
blas_mkl_info:
/home/maik/install/scipy/numpy-0.9.6/numpy/distutils/system_info.py:531: UserWarning: Library error: libs=['mkl', 'vml', 'guide'] found_libs=[]
warnings.warn("Library error: libs=%s found_libs=%s" % \
NOT AVAILABLE

atlas_blas_threads_info:
Setting PTATLAS=ATLAS
/home/maik/install/scipy/numpy-0.9.6/numpy/distutils/system_info.py:531: UserWarning: Library error: libs=['ptf77blas', 'ptcblas', 'atlas'] found_libs=[]
warnings.warn("Library error: libs=%s found_libs=%s" % \
/home/maik/install/scipy/numpy-0.9.6/numpy/distutils/system_info.py:531: UserWarning: Library error: libs=['ptf77blas', 'ptcblas', 'atlas'] found_libs=['/home/maik/install/scipy/Linux_P4SSE2/lib/libatlas.a']
warnings.warn("Library error: libs=%s found_libs=%s" % \
NOT AVAILABLE

atlas_blas_info:
/home/maik/install/scipy/numpy-0.9.6/numpy/distutils/system_info.py:531: UserWarning: Library error: libs=['f77blas', 'cblas', 'atlas'] found_libs=[]
warnings.warn("Library error: libs=%s found_libs=%s" % \
FOUND:
libraries = ['f77blas', 'cblas', 'atlas']
library_dirs = ['/home/maik/install/scipy/Linux_P4SSE2/lib']
language = c

/home/maik/install/scipy/numpy-0.9.6/numpy/distutils/system_info.py:1075: FutureWarning: hex()/oct() of negative int will return a signed string in Python 2.4 and up
magic = hex(hash(repr(config)))
running build_src
building extension "atlas_version" sources
adding 'build/src/atlas_version_0x8ff826e8cb24a6f9.c' to sources.
running build_ext
customize UnixCCompiler
customize UnixCCompiler using build_ext
building 'atlas_version' extension
compiling C sources
gcc options: '-pthread -fno-strict-aliasing -DNDEBUG -DHAVE_LARGEFILE_SUPPORT -O2 -fmessage-length=0 -Wall -fPIC'
compile options: '-Inumpy/core/include -I/usr/include/python2.3 -c'
gcc -pthread -shared build/temp.linux-x86_64-2.3/build/src/atlas_version_0x8ff826e8cb24a6f9.o -L/home/maik/install/scipy/Linux_P4SSE2/lib -lf77blas -lcblas -latlas -o build/temp.linux-x86_64-2.3/atlas_version.so
/usr/lib64/gcc-lib/x86_64-suse-linux/3.3.3/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /home/maik/install/scipy/Linux_P4SSE2/lib/libf77blas.a when searching for -lf77blas
/usr/lib64/gcc-lib/x86_64-suse-linux/3.3.3/../../../../x86_64-suse-linux/bin/ld: cannot find -lf77blas
collect2: ld returned 1 exit status
/usr/lib64/gcc-lib/x86_64-suse-linux/3.3.3/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /home/maik/install/scipy/Linux_P4SSE2/lib/libf77blas.a when searching for -lf77blas
/usr/lib64/gcc-lib/x86_64-suse-linux/3.3.3/../../../../x86_64-suse-linux/bin/ld: cannot find -lf77blas
collect2: ld returned 1 exit status
##### msg: error: Command "gcc -pthread -shared build/temp.linux-x86_64-2.3/build/src/atlas_version_0x8ff826e8cb24a6f9.o -L/home/maik/install/scipy/Linux_P4SSE2/lib -lf77blas -lcblas -latlas -o build/temp.linux-x86_64-2.3/atlas_version.so" failed with exit status 1
error: Command "gcc -pthread -shared build/temp.linux-x86_64-2.3/build/src/atlas_version_0x8ff826e8cb24a6f9.o -L/home/maik/install/scipy/Linux_P4SSE2/lib -lf77blas -lcblas -latlas -o build/temp.linux-x86_64-2.3/atlas_version.so" failed with exit status 1
FOUND:
libraries = ['f77blas', 'cblas', 'atlas']
library_dirs = ['/home/maik/install/scipy/Linux_P4SSE2/lib']
language = c
define_macros = [('NO_ATLAS_INFO', 2)]

Warning: distutils distribution has been initialized, it may be too late to add an extension _dotblas
Traceback (most recent call last):
File "setup.py", line 76, in ?
setup_package()
File "setup.py", line 63, in setup_package
config.add_subpackage('numpy')
File "/home/maik/install/scipy/numpy-0.9.6/numpy/distutils/misc_util.py", line 592, in add_subpackage
config_list = self.get_subpackage(subpackage_name,subpackage_path)
File "/home/maik/install/scipy/numpy-0.9.6/numpy/distutils/misc_util.py", line 582, in get_subpackage
subpackage_path)
File "/home/maik/install/scipy/numpy-0.9.6/numpy/distutils/misc_util.py", line 539, in _get_configuration_from_setup_py
config = setup_module.configuration(*args)
File "/home/maik/install/scipy/numpy-0.9.6/numpy/setup.py", line 10, in configuration
config.add_subpackage('core')
File "/home/maik/install/scipy/numpy-0.9.6/numpy/distutils/misc_util.py", line 592, in add_subpackage
config_list = self.get_subpackage(subpackage_name,subpackage_path)
File "/home/maik/install/scipy/numpy-0.9.6/numpy/distutils/misc_util.py", line 582, in get_subpackage
subpackage_path)
File "/home/maik/install/scipy/numpy-0.9.6/numpy/distutils/misc_util.py", line 539, in _get_configuration_from_setup_py
config = setup_module.configuration(*args)
File "numpy/core/setup.py", line 217, in configuration
config.add_data_dir('tests')
File "/home/maik/install/scipy/numpy-0.9.6/numpy/distutils/misc_util.py", line 636, in add_data_dir
self.add_data_files((ds,filenames))
File "/home/maik/install/scipy/numpy-0.9.6/numpy/distutils/misc_util.py", line 702, in add_data_files
dist.data_files.extend(data_dict.items())
AttributeError: 'NoneType' object has no attribute 'extend'
[/code]

In Zeile 2 bezieht er sich auf site.cfg ("Warning: not existing path in numpy/distutils: site.cfg"). Diese Datei gibt es bei mir nicht. Das ist wahrscheinlich das Problem.

Wäre schön wenn sich das mal jemand anschauen könnte.
CM
User
Beiträge: 2464
Registriert: Sonntag 29. August 2004, 19:47
Kontaktdaten:

Beitragvon CM » Donnerstag 1. Juni 2006, 13:18

Hoi,

benutzte auch SuSE (wenn auch unfreiwillig).
Folgender Anleitung hat bei mir einwandfrei funktioniert: http://pong.tamu.edu/tiki/tiki-view_blo ... &postId=97

Gruß,
Christian

edit:
PS Habe den Thread vorher nicht gesehen und war zwischenzeitlich auch eine Woche im Urlaub - aber das Problem scheint ja behoben zu sein ...
Benutzeravatar
tromai
User
Beiträge: 92
Registriert: Mittwoch 26. April 2006, 11:20

Beitragvon tromai » Dienstag 6. Juni 2006, 12:42

Nach dieser Anleitung hatte ich es probiert. Mittlerweile funktioniert es.
Allerdings habe ich das Problem nicht selbst gelöst und kann jetzt nicht genau sagen woran es gelegen hat. Scheinbar waren irgendwelche benötigten Libs nicht im shared Verzeichnis, sondern irgendwo anders abgelegt und wurden dann nicht gefunden.

Aber trotzdem danke für den Link.

Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder