简体   繁体   English

python3上的ete3模块-无法导入TreeStyle,faces,AttrFace,NodeStyle

[英]ete3 module on python3 - cannot import TreeStyle, faces, AttrFace, NodeStyle

I a linux user and so far I've using ete3 in python2 succesfully. 我是Linux用户,到目前为止,我已经在python2中成功使用了ete3。

I installed ete3 for python3 and there are certain modules that python3 can't find. 我为python3安装了ete3,但是python3找不到某些模块。 I believe I have all the dependencies installed according to the instructions. 我相信我已经按照说明安装了所有依赖项。

I can import ete3, and Tree from ete3 but not any other that I've using so far. 我可以从ete3导入ete3和Tree,但到目前为止不能使用其他任何东西。

Any clues on how to resolve this? 有关如何解决此问题的任何线索?

~$ 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'

I managed to install the dependencies. 我设法安装了依赖项。 The problem was that ete3 is not reporting properly the missing dependencies. 问题在于ete3无法正确报告丢失的依赖项。

You can see which dependencies are missing with this code: 您可以看到此代码缺少哪些依赖项:

import ete3
ete3.__file__

I run it multiple times and install the packages that was complaining about each time until it finally worked! 我多次运行它,并安装每次抱怨的软件包,直到最终起作用!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM