我在做生物信息学,它有生物细胞依赖性。Biopython总是给我以下错误:
我希望有人能帮我解决这个问题。谢谢您!
最佳答案
这可能发生在Biopython版本>=1.72上,并已在biopython mailing list here上讨论过。当您在biopython/
目录中尝试导入时,若要修复此错误,只需移动到源树之外的另一个目录,然后执行代码即可。
如果错误仍然发生,则安装可能没有正确安装,您可以尝试运行以下标准安装步骤(假设您没有使用pip
)以将文件和目录放置在正确的位置:
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
我们已经改进了未来biopython发布的回溯,请参见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