I am trying to create a python-2.7.10 module on a CentOS 6 cluster. My simple python-2.7.10 module file is :

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

When I load the module, e.g.

module load python-2.7.10 

python2.7 works fine. However, if I try to module list or module avail or module unload python-2.7.10

I get the error

init.c(556):ERROR:161: Cannot initialize TCL

However, if I try my octave-4.0.0 module :

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

I can module list, module avail and module unload octave-4.0.0 just fine. Clearly, my python-2.7.10 module has broken something. How do I fix this?


Evidently, setting LD_LIBRARY_PATH is bad form as discussed here, here and here. So I changed my evil ways and did not set LD_LIBRARY_PATH and my problem was solved.

EDIT : It turns out that the root of this problem is a difference between the system /usr/lib64/libtcl8.5.so and anaconda's /gpfs0/export/opt/anaconda-2.3.0/lib/libtcl8.5.so. Anaconda's tcl library is incompatible with the Modules package. The solution stays the same, but if you need the anaconda libraries you need to handle those on a case by case basis.


I've encountered the same issue and, using the suggestion from the link below, I was able to correct the problem without unsetting LD_LIBRARY_PATH. Basically, you disable the modulecmd's ability to use LD_LIBRARY_PATH for its execution; however, this change does not prevent modulecmd from modifying the LD_LIBRARY_PATH variable. The commands used are: chown nobody:nobody modulecmd chmod ug+s modulecmd


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.