jodyphelan / TBProfiler

Profiling tool for Mycobacterium tuberculosis to detect ressistance and strain type from WGS data
GNU General Public License v3.0
102 stars 42 forks source link

ModuleNotFoundError: No module named 'pathogenprofiler' #312

Closed Caitgwill closed 7 months ago

Caitgwill commented 7 months ago

How do I resolve this import error in the tbprofiler scripts?

This is the script:

! /usr/bin/env python

Load useful libraries

import json from collections import defaultdict import argparse import os from tqdm import tqdm import sys import csv import pathogenprofiler as pp import tbprofiler

This is the error log: Running command: set -u pipefail; git clone https://github.com/jodyphelan/tbdb.git

Running command: set -u pipefail; git pull

Running command: set -u pipefail; python parse_db.py --seqname Chromosome Command Failed! Please Check!Traceback (most recent call last): File "/scratch/cgw47706/preliminary_wgs_uganda/fastq_updated/tbprofiler_collate.py", line 11, in import pathogenprofiler as pp ModuleNotFoundError: No module named 'pathogenprofiler'

Caitgwill commented 7 months ago

I figured out the problem:

conda install -c bioconda tb-profiler

installs an older version rather than the most recent version.

Rebuilding the environments and using this command fixed my issues:

conda install -c bioconda tb-profiler=5.0.1