jiarong / VirSorter2

customizable pipeline to identify viral sequences from (meta)genomic data
GNU General Public License v2.0
212 stars 28 forks source link

Python library issues with conda install? #22

Open ekayal opened 3 years ago

ekayal commented 3 years ago

Hello, I am not really versed on conda and libraries and such but after installing virsorter 2 on our cluster (note that the default "beta" version is actually not correct and has to be manually installed apparently), I kept getting errors as follows when I actually run the script on a list of contigs as follows:

module load virsorter/2.0.beta
virsorter --version
virsorter setup -d db
virsorter run -d db  -w test -i Contigs.fa

Error is as follows:

Activating conda environment: /db/conda_envs/0ba4b697
Could not find platform independent libraries <prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Python path configuration:
  PYTHONHOME = (not set)
  PYTHONPATH = (not set)

The person in charge of our cluster said that a new conda version needs to be compiled. Any help/clue? Thanks a lot in advance. E

jiarong commented 3 years ago

I have not seen this errors before. My guess is that the error has something to do with how module load virsorter/2.0.beta was setup. The person helped you on that would be the best person to solve the issue. One general suggestion I can give is that module load and conda might not play well together. If you have to use module load, try to remove them from the batch scripts for job submission and do them in the interactive session before submit batch scripts.

ekayal commented 3 years ago

Alright, here are the details of the install that bug. It is supposedly more related to the program than to the set of our cluster. virsorter, version 2.0.alpha

Traceback (most recent call last):
  File "/shared/software/miniconda/envs/virsorter-2.0.beta/bin/virsorter", line 10, in <module>
    sys.exit(cli())
  File "/shared/software/miniconda/envs/virsorter-2.0.beta/lib/python3.8/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/shared/software/miniconda/envs/virsorter-2.0.beta/lib/python3.8/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/shared/software/miniconda/envs/virsorter-2.0.beta/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/shared/software/miniconda/envs/virsorter-2.0.beta/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/shared/software/miniconda/envs/virsorter-2.0.beta/lib/python3.8/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/shared/software/miniconda/envs/virsorter-2.0.beta/lib/python3.8/site-packages/virsorter/virsorter.py", line 202, in run_workflow
    make_config(
  File "/shared/software/miniconda/envs/virsorter-2.0.beta/lib/python3.8/site-packages/virsorter/config.py", line 70, in make_config
    groups_avail = os.listdir(f'{db_dir}/group')
FileNotFoundError: [Errno 2] No such file or directory: '/mnt/ufs18/home-111/guojiaro/Documents/dev/VirSorter2/db/group'

Any thoughts? Thanks E

jiarong commented 3 years ago

That's error in an old version. You should be able to resolve this by updating to the current version.

lecorguille commented 3 years ago

Hi, I'm the administrator of the @ekayal HPC infrastructure.

That's error in an old version. You should be able to resolve this by updating to the current version.

It's not a so old version, we have installed the 2.0beta Bioconda package based on your v2.0.beta.

BTW, as I'm writing this message, I can observe that you released a 2.0 👍 I didn't saw it so far. I will install it ASAP

ekayal commented 3 years ago

Hi agin, So, we got the latest version up : virsorter, version 2.0.beta Yet, we still get what seems to be a python error with the following basic command line:

virsorter run -d db -w test -i Contigs.fa

Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding
Python runtime state: core initialized
LookupError: no codec search functions registered: can't find encoding

Current thread 0x0000153e58751740 (most recent call first):
<no Python frame>

Any idea, given that it is python version 3.7.8. (please don't tell me it is because we need python version 3.8....) Thanks a lot in advance. E