
Ich versuche, ein Python-2.7.10-Modul auf einem CentOS 6-Cluster zu erstellen. Meine einfache python-2.7.10
Moduldatei ist:
#%Module1.0
prepend-path PATH /gpfs0/export/opt/anaconda-2.3.0/bin
prepend-path MANPATH /gpfs0/export/opt/anaconda-2.3.0/share
prepend-path LD_LIBRARY_PATH /gpfs0/export/opt/anaconda-2.3.0/lib
set-alias python /gpfs0/export/opt/anaconda-2.3.0/bin/python
set-alias python2.7 /gpfs0/export/opt/anaconda-2.3.0/bin/python
Wenn ich das Modul lade, zB
module load python-2.7.10
python2.7 funktioniert einwandfrei. Wenn ich jedoch versuche, module list
oder module avail
odermodule unload python-2.7.10
Ich erhalte den Fehler
init.c(556):ERROR:161: Cannot initialize TCL
Wenn ich jedoch mein octave-4.0.0
Modul ausprobiere:
#%Module1.0
prepend-path PATH /gpfs0/export/opt/octave-4.0.0/bin
prepend-path MANPATH /gpfs0/export/opt/octave-4.0.0/share
prepend-path LD_LIBRARY_PATH /gpfs0/export/opt/octave-4.0.0/lib
set-alias octave /gpfs0/export/opt/octave-4.0.0/bin/octave-4.0.0
set-alias octave-gui /gpfs0/export/opt/octave-4.0.0/bin/octave-4.0.0
set-alias octave-cli /gpfs0/export/opt/octave-4.0.0/bin/octave-cli-4.0.0
Ich kann module list
, module avail
und module unload octave-4.0.0
es funktioniert einwandfrei. Offensichtlich python-2.7.10
ist in meinem Modul etwas kaputt. Wie behebe ich das?
Antwort1
Offensichtlich ist das Setzen von LD_LIBRARY_PATH ein schlechter Stil, wie besprochenHier,HierUndHier. Also habe ich meine bösen Gewohnheiten geändert und LD_LIBRARY_PATH nicht festgelegt und mein Problem war gelöst.
BEARBEITEN: Es stellt sich heraus, dass die Ursache dieses Problems ein Unterschied zwischen dem System /usr/lib64/libtcl8.5.so
und dem von Anaconda ist /gpfs0/export/opt/anaconda-2.3.0/lib/libtcl8.5.so
. Die Tcl-Bibliothek von Anaconda ist nicht mit dem Modulpaket kompatibel. Die Lösung bleibt dieselbe, aber wenn Sie die Anaconda-Bibliotheken benötigen, müssen Sie diese von Fall zu Fall behandeln.
Antwort2
Ich bin auf dasselbe Problem gestoßen und konnte es mithilfe des Vorschlags unter dem folgenden Link beheben, ohne LD_LIBRARY_PATH zu deaktivieren. Im Grunde deaktivieren Sie die Fähigkeit von modulecmd, LD_LIBRARY_PATH für seine Ausführung zu verwenden. Diese Änderung verhindert jedoch nicht, dass modulecmd die Variable LD_LIBRARY_PATH ändert. Die verwendeten Befehle sind: chown nobody:nobody modulecmd chmod ug+s modulecmd