ImportError: cannot import name _aligners [biopython]

情到浓时终转凉″ 提交于 2019-12-10 18:55:50

问题


I am doing bioinformatics that has biopython dependency. Biopython always give me the following error:

I hope someone could help me with this issue. Thank you!


回答1:


This can occur on Biopython version >= 1.72 and has been discussed on the biopython mailing list here. This error occurs when you try and import while inside the biopython/ directory, to fix the error simply move to another directory outside the source tree and then execute your code.

If the error still occurs then likely the install has not been setup properly, and you can try running the following standard installation steps (assuming you have not used pip) to get the files and directories in the correct places:

python setup.py build
python setup.py test  # not compulsory for the fix
python setup.py install  # add '--prefix' flag to install to a particular directory

We have improved the traceback for future biopython releases, see 8efbf6d:

ImportError: cannot import name '_aligners': you should not import directly from the biopython source directory; please exit the source tree and re-launch your code from there


来源:https://stackoverflow.com/questions/51296034/importerror-cannot-import-name-aligners-biopython

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!