Open relyativist opened 5 years ago
Same problem here.
I met the same problem, have you solved it?
@vandeppce can you give us some more information about your environment? Are you working on a headless machine? What apt/OS packages did you install/are already installed.
This looks similar to an error we saw in other enthought open source packages on travis CI machines. We were able to fix those issues by installing additional apt packages. See https://github.com/enthought/envisage/blob/23ea9885a75044395942305c1f9edee077a9ffcd/.travis.yml#L9-L15
@vandeppce can you give us some more information about your environment? Are you working on a headless machine? What apt/OS packages did you install/are already installed.
This looks similar to an error we saw in other enthought open source packages on travis CI machines. We were able to fix those issues by installing additional apt packages. See https://github.com/enthought/envisage/blob/23ea9885a75044395942305c1f9edee077a9ffcd/.travis.yml#L9-L15
When I set QT_DEBUG_PLUGINS="1", no lib* packages uninstalled errors raised, it just says that "qt.qpa.xcb: could not connect to display qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found."
@vandeppce I edited your comment with minor formatting. I hope you don't mind.
@vandeppce I edited your comment with minor formatting. I hope you don't mind.
Of course not. I have been trapped in this problem for several days, could you please give me some idea on it? Is it a qt problem, or a mayavi problem? By the way, I used it in a Docker container, on a Jupyter Notebook.
Can you tell us what happens if you run the following commands - print(mlab.show_pipeline())
and print(mlab.options)
.
Also, I'm not sure how you are interacting with the notebook in the container - are you setting up an X server? Are you explicitly using the null backend or using offscreen rendering?
Can you tell us what happens if you run the following commands -
print(mlab.show_pipeline())
andprint(mlab.options)
.Also, I'm not sure how you are interacting with the notebook in the container - are you setting up an X server? Are you explicitly using the null backend or using offscreen rendering?
Thanks for your reply. I can not run the above commands, because I can not import mayavi.mlab successfully. I interact with the notebook in the container with a browser, I do not set up an X server, maybe it is the reason? I successfully install mayavi on my Mac osx laptop, but I still wonder the reason for why it failed in the container.
I have the same error? Is there anyone knowing how to solve this problem
I have the same issue
In /anaconda3/lib/python3.7/site-packages/PyQt5/Qt/plugins/platforms/libqwebgl.dylib:
Plugin uses incompatible Qt library (5.13.0) [release]
"The plugin '/anaconda3/lib/python3.7/site-packages/PyQt5/Qt/plugins/platforms/libqwebgl.dylib' uses incompatible Qt library. (5.13.0) [release]"
not a plugin
QFactoryLoader::QFactoryLoader() checking directory path "/anaconda3/bin/platforms" ...
qt.qpa.plugin: Could not find the Qt platform plugin "cocoa" in ""
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Abort trap: 6
Any tips?
miniconda environment with python 3.7, mayavi 4.7.1: same error when importing mlab
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" [...]
any help is appreciated
If you import multiple packages in your .py script, you may try import mayavi at the first place. For me, when I change from:
import os
import numpy as np
...
from mayavi import mlab
to
from mayavi import mlab
import os
import numpy as np
...
the issue disappeared.
I solved this problem by “sudo apt-get install libxcb-xinerama0” Hope it works for you
changing the order did fix the issue for me
I have had this issue for a week now and nothing helped -- until I ran "sudo apt-get install libxcb-xinerama0"! Thanks a lot @QYWT
from mayavi import mlab
crashes the process. Running on Ubuntu Bionic, headless server, conda environment, Python 3.8.8. Below are more details; none of the things proposed in this thread.
I was not expecting the QT display to work anyway on a headless server, but the hard 'abort' crash is brutal and there should be a recoverable state. I know this is probably easier said than done.
>>> from mayavi import mlab
qt.qpa.xcb: could not connect to display
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: eglfs, minimal, minimalegl, offscreen, vnc, webgl, xcb.
Aborted (core dumped)
apt install libproj-dev proj-bin
and libxcb-xinerama0
is also installed
mamba install -c conda-forge matplotlib vtk wordcloud pyqt mayavi
#conda list | grep qt
pyqt 5.12.3 py38h578d9bd_7 conda-forge
pyqt-impl 5.12.3 py38h7400c14_7 conda-forge
pyqt5-sip 4.19.18 py38h709712a_7 conda-forge
pyqtchart 5.12 py38h7400c14_7 conda-forge
pyqtwebengine 5.12.1 py38h7400c14_7 conda-forge
qt 5.12.9 hda022c4_4 conda-forge
I installed PyQt 5.14.2 as a workaround as suggested in tasmota/tasmotizer#71 since I am still on Debian Buster. It works for me now.
If you import multiple packages in your .py script, you may try import mayavi at the first place. For me, when I change from:
import os import numpy as np ... from mayavi import mlab
to
from mayavi import mlab import os import numpy as np ...
the issue disappeared.
This worked for me.
I have this same issue with importing mlab on headless Debian 5.15 using conda. The suggested fixes here don't work (fails on import of mlab so ordering not the problem and already have libxcb-xinerama0
, plus all the others listed here https://github.com/enthought/envisage/blob/23ea9885a75044395942305c1f9edee077a9ffcd/.travis.yml#L9-L15 installed).
Does anyone have any other suggestions?
I fixed this by running Xvfb
as per instructions here: https://docs.enthought.com/mayavi/mayavi/tips.html#rendering-using-the-virtual-framebuffer
Hello i tried to make instalation inside virtualenv with python 3.6.7, Here the steps i made:
pip install mayavi
- successpip install PyQt5
- successpip install pysurfer
- successjupyter nbextension install --py mayavi --user
jupyter nbextension install --py mayavi --user
Then in Ipython is try next:
And the error is:
How to resolve it?