Closed oca-john closed 4 years ago
Hi @oca-john , it is more about python version and set export PYTHONPATH=$PYTHONPATH:"."
might solve the issue. But it would be better to use python 2.7. It would also be better for you to check your packages here
Thank you for such a quick response. @liuqianhn I've changed back to python 2.7 today, but I received a similar response:
Traceback (most recent call last):
File "repeatHMM.py", line 17, in <module>
from scripts import myBAMhandler
File "/home/m/bin/bin-x/RepeatHMM/bin/scripts/myBAMhandler.py", line 25, in <module>
import myHMM
File "/home/m/bin/bin-x/RepeatHMM/bin/scripts/myHMM.py", line 5, in <module>
from hmmlearn import hmm
ImportError: No module named hmmlearn
And my Env is like this:
opensuse leap 15.1
python 2.7.14
peakutils 1.0.3
hmmlearn 0.2.2 -> reinstall hmmlearn under python2
sklearn 0.20.2
biopython 1.73
gcc 7.4.1
swig 3.0.12
make 4.2.1
bwa 0.7.17
trf 4.0.9
samtools 1.10
Thanks again for your warm reply!
Hi @oca-john , this error is because hmmlearn is not properly installed. You can use pip install peakutils==1.0.3 hmmlearn sklearn biopython
to install missing packages under your python2.
For I'm learning Python3, pip has been linked to pip3 by default (This is my negligence, and I'm really sorry).
But after executing the above command in pip2, biopython, numpy, scipy, and scikit-learn were all installed correctly. While hmmlearn reported an error.
BUT BUT BUT! These two packages solved the ERROR of hmmlearn compilation:
libboost_numpy-py2_7-1_66_0-devel
python2-numpy-devel
I think they might be the important python2-numpy development kits.
And it looks like RepeatHMM has run successfully (At least no error when using the -h parameter). Thanks for your help! @liuqianhn
Hi @oca-john , if you have both python2 and python3, it might cause many issues. I would suggest you using virtual environment. You can find how to use virtual environment at here.
OK! Thank you @liuqianhn . Because I don't like the conda. So, I'd like to change the env handly.
Hi @oca-john , env can do the same thing. Feel free to choose what you like.
Closed due to no recent activities.
Hi! There is an Error of RepeatHMM, when I typed
python repeatHMM.py
in the shell.I'd ensured many times there is a "getAlignment" file in the same folder with the "myBAMhandler" file.
BUT, python told me not found the module there. I don't know why. If there is a way to add them into the default PATH where python can find?