EnzymeFunctionInitiative / EST

Programs for creating Sequence Similarity Networks and wrappers for pipeline submission on a torque cluster
Other
6 stars 4 forks source link

cpamn or cpan #83

Open Sunysh opened 2 days ago

Sunysh commented 2 days ago

In docs/getting_started.rst, "cpamn --installdeps ." is correct? It should be "cpan --installdeps ."

Sunysh commented 2 days ago

![Uploading WX20240930-175850.png…]()

nilsoberg commented 2 days ago

Did you try cpanm --installdeps .? We use cpanminus which is in essence a lightweight version of cpan. Sometimes it isn't installed by default on systems. It may be included with a system package (e.g. sudo apt install cpanminus on Ubuntu/Debian), or it can be installed following the official guide. If you are doing an installation on a system and don't have administrative access a guide for that is also available. It is a bit more complicated to install the Perl modules on a system without root access, but it is possible (and is what we do on our cluster).

nilsoberg commented 2 days ago

If you can only install locally, here would be a procedure you could follow. First install cpanminus locally, then do the following (change /home/user/perl_local to be whatever path you want):

cpanm --local-lib=/home/user/perl_local local::lib eval $(perl -I /home/user/perl_local/lib/perl5/ -Mlocal::lib)

Now create a bash script /home/user/perl_local/perl_env.sh:

EFI_GROUP_HOME=/home/user/perl_local PATH="$EFI_GROUP_HOME/perl5/bin${PATH:+:${PATH}}"; export PATH; PERL5LIB="$EFI_GROUP_HOME/perl5/lib/perl5${PERL5LIB:+:${PERL5LIB}}"; export PERL5LIB; PERL_LOCAL_LIB_ROOT="$EFI_GROUP_HOME/perl5${PERL_LOCAL_LIB_ROOT:+:${PERL_LOCAL_LIB_ROOT}}"; export PERL_LOCAL_LIB_ROOT; PERL_MB_OPT="--install_base \"$EFI_GROUP_HOME/perl5\""; export PERL_MB_OPT; PERL_MM_OPT="INSTALL_BASE=$EFI_GROUP_HOME/perl5"; export PERL_MM_OPT;

Finally, you can install the Perl modules:

source /home/user/perl_local/perl_env.sh cpanm --installdeps .

You'll need to source /home/user/perl_local/perl_env.sh before running the pipelines, just like you need to run source efi-env/bin/activate for Python.