prokka icon indicating copy to clipboard operation
prokka copied to clipboard

Issue after conda install: Can't locate Bio/Root/Version.pm in @INC (you may need to install the Bio::Root::Version module)

Open c-leber opened this issue 3 years ago • 23 comments

Started an AWS Ubunutu 18.04 server. Installed python. Installed miniconda. Ran conda install -c conda-forge -c bioconda -c defaults prokka No apparent issues with install.

Try running prokka Output: Can't locate Bio/Root/Version.pm in @INC (you may need to install the Bio::Root::Version module) (@INC contains: /home/ubuntu/miniconda3/bin/../perl5 /home/ubuntu/miniconda3/lib/site_perl/5.26.2/x86_64-linux-thread-multi /home/ubuntu/miniconda3/lib/site_perl/5.26.2 /home/ubuntu/miniconda3/lib/5.26.2/x86_64-linux-thread-multi /home/ubuntu/miniconda3/lib/5.26.2 .) at /home/ubuntu/miniconda3/bin/prokka line 32. BEGIN failed--compilation aborted at /home/ubuntu/miniconda3/bin/prokka line 32.

Thoughts?

c-leber avatar Sep 02 '20 21:09 c-leber

Hi @c-leber ,

You will need to install the missing perl modules, in this case Bio. Try something like cpanm install Bio::Root::Version. If you get a new error message on running prokka after installation of the missing perl module, try cpanm install the::next::missing::module.

Good luck,

schultzm avatar Sep 02 '20 22:09 schultzm

Hi @schultzm ,

I appreciate the reply!

I tried installing as you advised, and ran into more issues: cpanm install Bio::Root::Version install is up to date. (0.01) --> Working on Bio::Root::Version Fetching http://www.cpan.org/authors/id/C/CJ/CJFIELDS/BioPerl-1.7.7.tar.gz ... OK Configuring BioPerl-1.7.7 ... OK ==> Found dependencies: XML::LibXML, XML::LibXML::Reader, DB_File, Test::Memory::Cycle --> Working on XML::LibXML Fetching http://www.cpan.org/authors/id/S/SH/SHLOMIF/XML-LibXML-2.0205.tar.gz ... OK ==> Found dependencies: Alien::Libxml2 --> Working on Alien::Libxml2 Fetching http://www.cpan.org/authors/id/P/PL/PLICEASE/Alien-Libxml2-0.16.tar.gz ... OK Configuring Alien-Libxml2-0.16 ... OK Building and testing Alien-Libxml2-0.16 ... FAIL ! Installing Alien::Libxml2 failed. See /home/ubuntu/.cpanm/work/1599085734.26465/build.log for details. Retry with --force to force install it. ! Installing the dependencies failed: Module 'Alien::Libxml2' is not installed ! Bailing out the installation for XML-LibXML-2.0205. --> Working on DB_File Fetching http://www.cpan.org/authors/id/P/PM/PMQS/DB_File-1.853.tar.gz ... OK Configuring DB_File-1.853 ... OK Building and testing DB_File-1.853 ... FAIL ! Installing DB_File failed. See /home/ubuntu/.cpanm/work/1599085734.26465/build.log for details. Retry with --force to force install it. --> Working on Test::Memory::Cycle Fetching http://www.cpan.org/authors/id/P/PE/PETDANCE/Test-Memory-Cycle-1.06.tar.gz ... OK Configuring Test-Memory-Cycle-1.06 ... OK ==> Found dependencies: PadWalker --> Working on PadWalker Fetching http://www.cpan.org/authors/id/R/RO/ROBIN/PadWalker-2.3.tar.gz ... OK Configuring PadWalker-2.3 ... OK Building and testing PadWalker-2.3 ... FAIL ! Installing PadWalker failed. See /home/ubuntu/.cpanm/work/1599085734.26465/build.log for details. Retry with --force to force install it. ! Installing the dependencies failed: Module 'PadWalker' is not installed ! Bailing out the installation for Test-Memory-Cycle-1.06. ! Installing the dependencies failed: Module 'DB_File' is not installed, Module 'XML::LibXML::Reader' is not installed, Module 'XML::LibXML' is not installed, Module 'Test::Memory::Cycle' is not installed ! Bailing out the installation for BioPerl-1.7.7.

I then tried installing these individual dependencies with --force as described in the output. However, this led to even more failed installs and more dependencies asking for individual install with --force

Any additional ideas?

c-leber avatar Sep 02 '20 22:09 c-leber

How about installing BioPerl using conda

conda install -c bioconda perl-bioperl 

https://anaconda.org/bioconda/perl-bioperl

nigyta avatar Sep 03 '20 00:09 nigyta

Hi @nigyta ,

Thanks for the response.

I tried installing BioPerl using conda. It installs successfully, but I still have the same issues with Bio::Root::Version still not being located, or able to be installed.

Searching through the various logs, I was able to resolve some issues by installing make and gcc_linux-64 via conda. Some dependencies, especially DB_File, are still not installing, due to missing libdb-dev. I tried installing libdb via conda, and this did not help. I then installed libdb-dev via apt install, which is successful, but is still said to be missing when I try to install DB_File.

So at this time, it appears to be an issue with libdb-dev being installed, but not being found.

c-leber avatar Sep 03 '20 01:09 c-leber

I tried to install prokka to a clean conda environment on Mac, but I got the same error.

Can't locate Bio/Root/Version.pm in @INC  ...

I found a similar issue here https://github.com/bioconda/bioconda-recipes/issues/10277 This may help

nigyta avatar Sep 03 '20 02:09 nigyta

Hi @nigyta ,

So I followed the suggestion here: [https://github.com/bioconda/bioconda-recipes/issues/10277#issuecomment-470291356_] And downgraded my perl install to version 5.22

This resulted in a message saying XML::Simple was missing, which I was able to fix with conda install -c bioconda perl-xml-simple

prokka now responds positively when I call to it via prokka

Going to grab some files now - hopefully it runs successfully! Will report back tomorrow.

c-leber avatar Sep 03 '20 03:09 c-leber

Maybe you can get into the perl environment by perl -MCPAN -e shell force install {related module} my prokka works by this way.

xzsword avatar Oct 22 '20 02:10 xzsword

I tried everything that was said.

Changing variables - YES **) what helped in the end is setting the environment variable as: export PERL5LIB=$CONDA_PREFIX/lib/perl5/site_perl/5.22.0/ To make this permanent in your conda environment, use: conda env config vars set PERL5LIB=$CONDA_PREFIX/lib/perl5/site_perl/5.22.0/ -n [env_name]

MAKE SURE PERL 5.22 IS ALREADY INSTALLED (I think it automatically is with prokka but am not 100% sure)

Downgrading perl - NO

  1. Downgrading perl by installing it in the environment did not actually downgrade it because of all the dependencies
  2. Perl can only be downgraded by creating a new environment, but it gave me the same error

Installing with cpan/m - NO

  1. Did not work when I tried with the cpan shell, either the system's or the specific environment's, and neither when I used cpan or reinstalled cpanminus from conda.

This is actually a problem I saw with a bunch of other programs (just google Bio::Root::Version and you'll get plenty of github results)

nongiga avatar Dec 02 '20 08:12 nongiga

Are there any updates on the issue? I've got a very same problem.

homeveg avatar Jan 11 '21 13:01 homeveg

I tried everything that was said.

Changing variables - YES **) what helped in the end is setting the environment variable as: export PERL5LIB=$CONDA_PREFIX/lib/perl5/site_perl/5.22.0/ To make this permanent in your conda environment, use: conda env config vars set PERL5LIB=$CONDA_PREFIX/lib/perl5/site_perl/5.22.0/ -n [env_name]

MAKE SURE PERL 5.22 IS ALREADY INSTALLED (I think it automatically is with prokka but am not 100% sure)

Downgrading perl - NO

  1. Downgrading perl by installing it in the environment did not actually downgrade it because of all the dependencies
  2. Perl can only be downgraded by creating a new environment, but it gave me the same error

Installing with cpan/m - NO

  1. Did not work when I tried with the cpan shell, either the system's or the specific environment's, and neither when I used cpan or reinstalled cpanminus from conda.

This is actually a problem I saw with a bunch of other programs (just google Bio::Root::Version and you'll get plenty of github results)

Thank you very much! The way changing variables worked!

Ash1One avatar Jan 20 '21 14:01 Ash1One

I tried everything that was said.

Changing variables - YES **) what helped in the end is setting the environment variable as: export PERL5LIB=$CONDA_PREFIX/lib/perl5/site_perl/5.22.0/ To make this permanent in your conda environment, use: conda env config vars set PERL5LIB=$CONDA_PREFIX/lib/perl5/site_perl/5.22.0/ -n [env_name]

MAKE SURE PERL 5.22 IS ALREADY INSTALLED (I think it automatically is with prokka but am not 100% sure)

Downgrading perl - NO

  1. Downgrading perl by installing it in the environment did not actually downgrade it because of all the dependencies
  2. Perl can only be downgraded by creating a new environment, but it gave me the same error

Installing with cpan/m - NO

  1. Did not work when I tried with the cpan shell, either the system's or the specific environment's, and neither when I used cpan or reinstalled cpanminus from conda.

This is actually a problem I saw with a bunch of other programs (just google Bio::Root::Version and you'll get plenty of github results)

Thank you for the solution, nothing else worked for me

timyerg avatar Mar 21 '21 22:03 timyerg

Hi @nigyta ,

So I followed the suggestion here: [https://github.com/bioconda/bioconda-recipes/issues/10277#issuecomment-470291356_] And downgraded my perl install to version 5.22

This resulted in a message saying XML::Simple was missing, which I was able to fix with conda install -c bioconda perl-xml-simple

prokka now responds positively when I call to it via prokka

Going to grab some files now - hopefully it runs successfully! Will report back tomorrow.

h

Caiyulu-818 avatar May 26 '21 02:05 Caiyulu-818

I'm having the same issue (in a somewhat specialized setup - Docker container I'm building in WSL to run a snakemake pipeline including prokka) - downgrading Perl doesn't work due to dependencies, installing Bio::Root::Version gives many of the same errors @c-leber had, installing bioperl with the version fixed to 1.7.2 as suggested in #566 also clashes with dependencies and aiming for >=1.7.2 still leads to the same issues.

KatSteinke avatar Jul 06 '21 06:07 KatSteinke

Hi, This solved the problem for me :

  • Edit execution file of prokka (which prokka)
  • Comment line 23 and save: #use lib "$FindBin::RealBin/../perl5"; # for bundled Perl modules

Hope this helps.

erifa1 avatar Jul 09 '21 09:07 erifa1

I get this error too. bioperl, perl-xml-simple are already installed.

sorenwacker avatar Jul 29 '21 19:07 sorenwacker

Can you send the result of conda list? I suspect an older version of bioperl is installed.

Make sure you have version 1.7.2 installed.

andersgs avatar Jul 29 '21 19:07 andersgs

Conda had installed 1.6. Apparently, because I also wanted to install Roary in the same environment, which apparently needs version 1.6. It is strange that I had both programs running in the same environment before.

This worked:

mamba create -y -c anaconda -c bioconda prokka pandas seaborn ipykernel perl-bioperl==1.7.2 -n prokka

This does not:

mamba create -y -c anaconda -c bioconda prokka pandas seaborn ipykernel perl-bioperl==1.7.2 roary -n prokka 

sorenwacker avatar Jul 30 '21 02:07 sorenwacker

Dependency install can be problematic. Not isolated to conda. Can you try to upgrade?

andersgs avatar Jul 30 '21 02:07 andersgs

You are fast. I was still editing the post :-)

sorenwacker avatar Jul 30 '21 02:07 sorenwacker

I'm having the same issue (in a somewhat specialized setup - Docker container I'm building in WSL to run a snakemake pipeline including prokka) - downgrading Perl doesn't work due to dependencies, installing Bio::Root::Version gives many of the same errors @c-leber had, installing bioperl with the version fixed to 1.7.2 as suggested in #566 also clashes with dependencies and aiming for >=1.7.2 still leads to the same issues.

Hello dear friend.

Kindly try out this command: conda install -c biobuilds perl=5.22 provided by carissableker https://github.com/bioconda/bioconda-recipes/issues/10277

I sorted out this issue of dependencies at once.

noutin2020 avatar Aug 28 '21 18:08 noutin2020

I'm having the same issue (in a somewhat specialized setup - Docker container I'm building in WSL to run a snakemake pipeline including prokka) - downgrading Perl doesn't work due to dependencies, installing Bio::Root::Version gives many of the same errors @c-leber had, installing bioperl with the version fixed to 1.7.2 as suggested in #566 also clashes with dependencies and aiming for >=1.7.2 still leads to the same issues.

Hello dear friend.

Kindly try out this command: conda install -c biobuilds perl=5.22 provided by carissableker bioconda/bioconda-recipes#10277

I sorted out this issue of dependencies at once. This worked for my device actually, and I really wonder why I have missed some dependencies since I did use prokka very a few weeks ago.

Naclist avatar Sep 21 '21 12:09 Naclist

Adding the conda --no-channel-priority option resulted in a seemingly-functional most-recent version of prokka in my environment:

$ conda create --no-channel-priority -c conda-forge -c bioconda -n prokka prokka
...
$ source activate prokka
(prokka) $ prokka --version
prokka 1.14.6
(prokka) $ prokka plasmid.fna
...
[15:07:36] Share and enjoy!

nathanweeks avatar Nov 19 '21 20:11 nathanweeks

thanks @sorenwacker

mamba create -y -c anaconda -c bioconda prokka pandas seaborn ipykernel perl-bioperl==1.7.2 -n prokka

this worked for me on a ubuntu 18 machine after failing with other methods too would be nice to add this to the main ReadMe for others!

splaisan avatar Dec 08 '21 10:12 splaisan