Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation Error: ModuleNotFoundError: No module named 'Bio' #21

Open
Lisijun-m opened this issue Dec 7, 2022 · 7 comments
Open

Installation Error: ModuleNotFoundError: No module named 'Bio' #21

Lisijun-m opened this issue Dec 7, 2022 · 7 comments

Comments

@Lisijun-m
Copy link

I installed python3
biopython
pysam
gffutils
pandas
cmake
samtools
zlib in a newly created conda environment.

conda create -n asgal -y
conda activate asgal
conda install python=3.6 -y
conda install biopython
pip install pysam
pip install pandas
conda install samtools -y
conda install cmake -y
conda install gffutils -y
conda install zlib

And then execute the following commands:

git clone --recursive https://github.com/AlgoLab/galig.git
cd galig
make prerequisites
make

However when I try to run asgal (./asgal -h), there is an error:

Traceback (most recent call last):
  File "./asgal", line 12, in <module>
    from Bio import SeqIO
ModuleNotFoundError: No module named 'Bio'

How can I fix this problem?

@ldenti
Copy link
Member

ldenti commented Dec 7, 2022

Hi, can you try running

python3 asgal.py -h

?

@Lisijun-m
Copy link
Author

Unfortunately, when I use the example data of gene CG13375 in Drosophila Melanogaster I got the same error:

This is the command I executed:
~/galig/asgal -g genome.fa -a annotation.gtf -s sample_1.fa -o asgal_out

This is the error:

Traceback (most recent call last):
  File "/dat1/lisijun/galig/asgal", line 12, in <module>
    from Bio import SeqIO
ModuleNotFoundError: No module named 'Bio'

@Lisijun-m
Copy link
Author

Hi, can you try running

python3 asgal.py -h

?

Command:
python3 asgal.py -h

Error:
python3: can't open file 'asgal.py': [Errno 2] No such file or directory

I searched though the galig directory, the bin directory and the scripts directory, but I can't find a python script named asgal.py. Where can I find asgal.py?

@ldenti
Copy link
Member

ldenti commented Dec 12, 2022

Sorry, my fault, the script is asgal:

python3 asgal -h

(this from the root of this repo).

@Lisijun-m
Copy link
Author

Sorry, my fault, the script is asgal:

python3 asgal -h

(this from the root of this repo).

It works! Now I can run the example data by asgal, thank you!

(By the way, I am wondering why there were errors like no python modules when executing asgal directly...)

@ldenti
Copy link
Member

ldenti commented Dec 12, 2022

Great. I suspect it is due to the shebang

galig/asgal

Line 1 in 8808115

#!/usr/bin/python3

Can you try to change it to

#!/usr/bin/env python

and try again with

./asgal -h

?

@Lisijun-m
Copy link
Author

Since I installed ASGAL in a conda environment, I changed
#!/usr/bin/python3
as
!/dat1/lisijun/miniconda3/envs/asgal/bin/python

And it turns out that the command works! Thank you!
./asgal -h

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants