Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente Prochaine révisionLes deux révisions suivantes | ||
scipy [2008/03/05 13:05] – gerard | scipy [2008/03/27 19:32] – gerard | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
- | ====== | + | ====== |
- | | + | On trouve plusieurs versions de python sur nemo: |
+ | ^ origine ^ chemin ^ version ^ PYTHONPATH ^ 32/64 ^ | ||
+ | | SUNWPython | / | ||
+ | | SMCpython | / | ||
+ | | CSWpython | / | ||
+ | | sources | / | ||
- | ====== | + | |
- | * numpy-1.0.4.tar.gz | + | ===== Compilation de python |
+ | ==== 32 bits ==== | ||
+ | < | ||
+ | ./configure --prefix=/ | ||
+ | CC=cc CXX=CC \ | ||
+ | CPPFLAGS=" | ||
+ | LDFLAGS=" | ||
+ | </ | ||
+ | Penser à commenter OPT: dans le Makefile | ||
+ | |||
+ | ==== 64 bits ==== | ||
+ | < | ||
+ | ./configure --prefix=/ | ||
+ | CC=cc CXX=CC \ | ||
+ | CPPFLAGS=" | ||
+ | LDFLAGS=" | ||
+ | </ | ||
+ | erreur: | ||
+ | < | ||
+ | "/ | ||
+ | cc: acomp failed for / | ||
+ | |||
+ | </ | ||
+ | |||
+ | ====== numpy ====== | ||
+ | ===== Installation avec Python 2.4 ===== | ||
+ | * [[http:// | ||
se logger devel1 sur nemo: | se logger devel1 sur nemo: | ||
< | < | ||
Ligne 14: | Ligne 45: | ||
library_dirs = / | library_dirs = / | ||
include_dirs = / | include_dirs = / | ||
+ | |||
+ | [blas] | ||
+ | blas_libs = sunperf | ||
+ | |||
+ | [lapack] | ||
+ | lapack_libs = sunperf | ||
+ | |||
+ | </ | ||
+ | remove numpy/ | ||
+ | < | ||
+ | > python setup.py install --prefix=$HOME/ | ||
+ | |||
+ | </ | ||
+ | et s' | ||
+ | |||
+ | Le test: | ||
+ | < | ||
+ | setenv PYTHONPATH / | ||
+ | python -c ' | ||
+ | </ | ||
+ | échoue sur: | ||
+ | < | ||
+ | ====================================================================== | ||
+ | FAIL: check_large_types (numpy.core.tests.test_scalarmath.TestPower) | ||
+ | ---------------------------------------------------------------------- | ||
+ | Traceback (most recent call last): | ||
+ | File "/ | ||
+ | assert b == 6765201, "error with %r: got %r" % (t,b) | ||
+ | AssertionError: | ||
+ | |||
+ | </ | ||
+ | et pourtant: | ||
+ | < | ||
+ | nemo-henry% / | ||
+ | Python 2.4.4 (#1, Jan 9 2007, 23:31:33) [C] on sunos5 | ||
+ | Type " | ||
+ | >>> | ||
+ | True | ||
+ | >>> | ||
+ | </ | ||
+ | |||
+ | ===== Installation avec Python 2.5 ===== | ||
+ | se logger devel1 sur nemo: | ||
+ | < | ||
+ | module load ss12 hpc | ||
+ | </ | ||
+ | fichier site.cfg dans numpy/ | ||
+ | < | ||
+ | [DEFAULT] | ||
+ | library_dirs = / | ||
+ | include_dirs = / | ||
[blas] | [blas] | ||
Ligne 24: | Ligne 106: | ||
et enfin: | et enfin: | ||
< | < | ||
- | > python setup.py install --prefix=$HOME/ | + | > setenv LDFLAGS " |
+ | > / | ||
+ | </ | ||
+ | et s' | ||
+ | Le test: | ||
+ | < | ||
+ | setenv PYTHONPATH / | ||
+ | / | ||
</ | </ | ||
+ | |||
+ | ===== Installation avec python 2.5.2 ===== | ||
+ | python a été recompilé à partir des sources: | ||
+ | < | ||
+ | > module load ss12 hpc | ||
+ | > setenv PATH / | ||
+ | > python setup.py install --prefix=$HOME/ | ||
+ | |||
+ | |||
+ | ====== scipy ====== | ||
+ | |||
+ | ===== Installation avec python 2.4 ===== | ||
* scipy-0.6.0.tar.gz | * scipy-0.6.0.tar.gz | ||
Ligne 39: | Ligne 140: | ||
> | > | ||
> python setup.py config_fc --help-fcompiler | > python setup.py config_fc --help-fcompiler | ||
- | Running from numpy source directory. | + | |
SunFCompiler instance properties: | SunFCompiler instance properties: | ||
archiver | archiver | ||
Ligne 48: | Ligne 149: | ||
compiler_fix | compiler_fix | ||
xcode=pic32' | xcode=pic32' | ||
- | libraries | + | libraries |
library_dirs | library_dirs | ||
linker_exe | linker_exe | ||
- | linker_so | + | linker_so |
+ | | ||
object_switch | object_switch | ||
ranlib | ranlib | ||
Ligne 60: | Ligne 162: | ||
</ | </ | ||
+ | Puis, en s' | ||
+ | < | ||
+ | > setenv LD_PRELOAD / | ||
+ | > wget " | ||
+ | > tar xzf ../ | ||
+ | > cd scipy-0.5.2.1/ | ||
+ | > python setup.py install --prefix=$HOME/ | ||
- | python setup.py config_fc --fcompiler=<Vendor> install | + | |
- | | + | </code> |
+ | ===== Installation avec python | ||
- | pour numpy: | + | < |
- | > python | + | > which python |
- | Running from numpy source directory. | + | / |
- | Global options: | + | > / |
- | --verbose (-v) run verbosely (default) | + | posix sunos5 |
- | | + | > / |
- | --dry-run (-n) | + | 2.5.1 (r251:54863, Nov 3 2007, 02:54:36) [C] |
- | | + | </ |
- | Options for 'config' | + | Puis, en s'inspirant du [[http:// |
- | | + | < |
- | | + | > setenv LD_PRELOAD / |
- | | + | > wget " |
- | --define (-D) C preprocessor macros to define | + | > tar xzf ../ |
- | --undef (-U) C preprocessor macros to undefine | + | > cd scipy-0.5.2.1/ |
- | --libraries (-l) | + | > / |
- | --library-dirs (-L) directories to search for external C libraries | + | |
- | --noisy | + | |
- | --dump-source | + | |
- | | + | |
- | --fcompiler | + | |
- | usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...] | + | |
- | or: setup.py --help [cmd1 cmd2 ...] | + | </ |
- | or: setup.py --help-commands | + | |
- | or: setup.py cmd --help | + | |
- | > | ||
- | python setup.py install | ||
- | site.cfg | + | ====== PyStemmer ====== |
+ | s' | ||
+ | < | ||
+ | / | ||
+ | > python setup.py install --prefix=$HOME/ | ||
+ | running install | ||
+ | running build | ||
+ | running build_ext | ||
+ | running install_lib | ||
+ | copying build/ | ||
- | python -c ' | + | </ |
+ | |||
+ | |||
+ | ====== PyML ====== | ||
+ | * problèmes de [[compil_pyml|compilation]] | ||