python3上的ete3模块无法导入TreeStyle、faces、AttrFace、NodeSty

2024-06-01 08:37:53 发布

您现在位置:Python中文网/ 问答频道 /正文

我是一个linux用户,到目前为止,我已经在python2中成功地使用了ete3。在

我为python3安装了ete3,有些模块python3找不到。我相信我已经按照说明安装了所有的依赖项。在

我可以从ete3导入ete3和Tree,但不能导入到目前为止使用的任何其他工具。在

有什么线索可以解决这个问题吗?在

~$ python3
Python 3.4.3 (default, Nov 28 2017, 16:41:13)
[GCC 4.8.4] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import ete3
>>> from ete3 import Tree
>>> from ete3 import TreeStyle
Traceback (most recent call last):
 File "<stdin>", line 1, in <module>
ImportError: cannot import name 'TreeStyle'
>>> from ete3 import faces
Traceback (most recent call last):
 File "<stdin>", line 1, in <module>
ImportError: cannot import name 'faces'
>>> from ete3 import AttrFace
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: cannot import name 'AttrFace'
>>> from ete3 import NodeStyle
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: cannot import name 'NodeStyle'

Tags: infromimportmoststdinlinecallfile
1条回答
网友
1楼 · 发布于 2024-06-01 08:37:53

我设法安装了依赖项。问题是ete3没有正确地报告丢失的依赖项。在

您可以看到此代码缺少哪些依赖项:

import ete3
ete3.__file__

我运行了很多次,每次都安装那些抱怨的包,直到它最终成功!在

相关问题 更多 >