-
-
Notifications
You must be signed in to change notification settings - Fork 214
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing import TreeStyle #354
Comments
this is the usual error you get when some graphic libraries are not correctly installed. |
Really "this is the usual error you get when some graphic libraries are not correctly installed" @jhcepas? This is an horrible way to signal the problem! If It's really bad for a new user to try the examples in the docs and have a completely uninformative |
I know! it is ugly! we need to fix this... |
hello, same problem here installed PyQt5 and ete3 in my ~/.local directory
and can't import TreeStyle
NB ete3 (3.1.1) |
looking at pyqt libraries I found that (in my case) some system libraries were missing see:
after installing missing libgGL.so.1 problem solved.
|
related #444 |
Still got this error on Python 3.6, MacOS Catalina, Miniconda 4.6.12 |
I too have this error. Anyone have a temporary workaround? Importing PyQt5 v 5.14.2 does not resolve the issue. Python 3.7, macOS Catalina 10.15.3 in a pipenv. |
As my experience, for conda user, I would suggest install it as for pip user, I would suggess install with These work for me |
Following step suggested by @dengzq1234, It worked. Installed using pip Called TreeStyle as below
|
pip3 install PyQt5==5.11.3 |
tried PyQt5==5.14.0, PyQt5==5.11.3, not working |
Any workaround for this issue? |
If you are getting this error after the following sequence:
you also need to (3) restart your Python and then it should work |
What do you exactly mean with "restart your Python"? |
|
Isn't this obvious given that you suggest to install a new package? I thought you meant something more exotic… |
Hi, I had a TreeStyle import error as well and here is the story how I solved it: |
I've got the same problem. I installed |
hi,
if you install pyqt successfully via conda, pyqt package should be
installed in the python site package, for example
`/miniconda3/envs/ete3.1.2/lib/python3.6/site-packages/PyQt5/`. if you
couldn't find it try to locate yout pygt and create a link or reinstall it.
If it still didn't work, please provide the errors and your installing
command.
best
GOUNOT Jean-Sebastien ***@***.***> 于2021年3月31日周三 下午1:00写道:
… I've got the same problem. I installed ete3 (3.1.2) with conda, which
installed pyqt (5.9.2) too. Now I've got the same error message but with
nothing to help me.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#354 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AGDS2VYUUIWIE7Z6HQ66FLDTGL6D7ANCNFSM4E7JIKXA>
.
|
Interesting, would you mind showing me the result of
`import sys`
`print(sys.path)`
?
GOUNOT Jean-Sebastien ***@***.***> 于2021年3月31日周三 下午2:43写道:
… I don't know, am I missing something ?
[image: image]
<https://user-images.githubusercontent.com/13219245/113145883-92f5d700-9261-11eb-90b4-57da94797f46.png>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#354 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AGDS2V76CVTP3ID2KNDR2U3TGMKGXANCNFSM4E7JIKXA>
.
|
Edit : Is there a place into ete3 code I can modify to have a better error message ? |
it seems your PyQt5 is installed under the path "/home/jsgounot/anaconda3/
envs/ete/lib/python3.6/site-packages/", but your python built-in path
doesn't include it. But I see you once successfully import PyQt5, do you
mind also tracking the path of PyQt5 by "print(PyQt5.__file__)"
GOUNOT Jean-Sebastien ***@***.***> 于2021年3月31日周三 下午3:37写道:
… ['/home/jsgounot/anaconda3/envs/ete/bin', '/home/jsgounot/anaconda3/envs/ete/lib_pypy/__extensions__', '/home/jsgounot/anaconda3/envs/ete/lib_pypy', '/home/jsgounot/anaconda3/envs/ete/lib-python/3', '/home/jsgounot/anaconda3/envs/ete/lib-python/3/lib-tk', '/home/jsgounot/anaconda3/envs/ete/lib-python/3/plat-linux2', '', '/home/jsgounot/anaconda3/envs/ete/site-packages', '/home/jsgounot/anaconda3/envs/ete/site-packages/ete3-3.1.2-py3.7.egg', '/home/jsgounot/anaconda3/envs/ete/site-packages/IPython/extensions', '/home/jsgounot/.ipython']
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#354 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AGDS2V6ZA6OR7KT7OBB5XNTTGMQSJANCNFSM4E7JIKXA>
.
|
|
I finally searched a bit and this is an issue I have with PyQt5. Nevertheless, if you encounter the same issue, try this import, should be more meaningful : |
It says I need QtPy4. But I've installed QtPy5. Should I install QtPy4 anyway? |
no, it should work with Qt5.
could you try if pyqt modules are importable regardless of ete3?
…On Thu, 10 Jun 2021 at 13:49, dailing57 ***@***.***> wrote:
I finally searched a bit and this is an issue I have with PyQt5.
Nevertheless, if you encounter the same issue, try this import, should be
more meaningful : from ete3.treeview.main import TreeStyle
It says I need QtPy4. But I've installed QtPy5. Should I install QtPy4
anyway?
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#354 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABH6SS2DUE6VY3FS6OIXHDTSCRDHANCNFSM4E7JIKXA>
.
|
Yes, I can import PyQt5 successfully. But I can't overcome the TreeStyle problem. |
I have worked my way through this thread trying the solutions and I am now at this same issue. I can also successfully import PyQt5 but when typing from |
this is very frustrating. I know that that is not helpful. But I feel the need to express this. |
This is still not working. I have invested a lot of time writing ete3 code and the module is now broken on every machine I install it. As stubbsrl said, I have also tried every solution and got to the ModuleNotFoundError: No module named 'PyQt4' one. Is there any dev trying to solve this? As above, I am using a fresh conda environment python 3.8. |
Ok, because I am using CentOS, I had to do: sudo yum install mesa-libGL Then change import back to: import PyQt5 Now this seems to be working. |
To get this
My minimal requirements file looks like:
|
Installed everything through conda and it worked for me. python==3.6.13 Imported TreeStyle through ete3- Took me a day but got it working for cafe_fig. Cheers for all the pointers above! |
pip install PyQt5 |
I had the exact same error, and this is really helpful. Thank you! For the missing |
Installed Packages
Requirement already satisfied: ete3 in /usr/local/lib/python3.6/dist-packages (3.0.0b35)
Requirement already satisfied: PyQt5 in /usr/local/lib/python3.6/dist-packages (5.10.1)
Requirement already satisfied: sip in /usr/local/lib/python3.6/dist-packages (4.19.8)
Requirement already satisfied: six in /usr/local/lib/python3.6/dist-packages (1.11.0)
Code to resproduce
Example Tree from Documentation: Documentation
from ete3 import Tree, TreeStyle t = Tree() t.populate(50, random_branches=True) t.convert_to_ultrametric() t.show()
Error message
ImportError: cannot import name 'TreeStyle'
Is there some change I missed in the package? Did the class 'TreeStyle' deprecated or did something else happen?
The text was updated successfully, but these errors were encountered: