How to create modulefile on centos7 for any software (ex. for python)?
path of modulefile is /etc/modulefile
I have two version of python ( python2.7 and python3.7).
I Create a directory for python inside modulefiles /etc/modulefiles/python
, then I shoud create a modulefiles for paython as a following code :
#%Module 1.0
# python2.7 module file
conflict python
prepend-path PATH ---
prepend-path LD_LIBRARY_PATH ----
prepend-path MANPATH ---
prepend-path INFOPATH ---
setenv --_DIR ---
setenv --_BIN ---
setenv --_INC ---
setenv --_LIB ---
My question is how can I get the right variables of prepend-path
and setenv
Below is result of whereis python
command, can we extract varable of prepend-path
and setenv
from it:
[root@mu modulefiles]# whereis python
python: /usr/bin/python /usr/bin/python2.7 /usr/bin/python2.7-config /usr/lib/python2.7 /usr/lib64/python2.7 /etc/python /usr/local/bin/python3.7m-config /usr/local/bin/python3.7m /usr/local/bin/python3.7 /usr/local/lib/python3.7 /usr/include/python2.7 /etc/modulefiles/python /usr/share/man/man1/python.1.gz