有人知道为什么我会收到以下错误吗?
>>> from Bio.Phylo.TreeConstruction import DistanceCalculator, DistanceTreeConstructor
Traceback (most recent call last):
File "<pyshell#6>", line 1, in <module>
import Bio.Phylo.TreeConstruction
ImportError: No module named TreeConstruction
还有:
>>> from Bio.Phylo.Consensus import *
Traceback (most recent call last):
File "<pyshell#9>", line 1, in <module>
from Bio.Phylo.Consensus import *
ImportError: No module named Consensus
感谢所有人的时间=)
答案 0 :(得分:0)
确定。固定!
问题是在python IDLE中,biopython的版本是1.63,而代码
>>>from Bio.Phylo.TreeConstruction import DistanceCalculator, DistanceTreeConstructor
适用于版本1.65。因此,解决方案是删除安装了biopython 1.63的文件夹并下载(稍后)重新安装biopython 1.65。