PyQT5 error: Could not find or load Qt platform plugin xcb
Until Anaconda3
(which contains Python 3.4
) was reinstalled on my workstation RedHat 6.5
, I was able to develop Python applications that use PyQT5
.
After reinstalling Anaconda
, an error message appears:
.... could not find or load the Qt platform plugin xcb
The only difference between Anaconda installations is the folder name: /usr/local/ananaconda3
vs/usr/local/anaconda_py3
I have checked libqxcb.so
does not have any missing dependencies. I have restored PyQT5
. I tried to explicitly add the location site-packages
to PyQT5
:
import site
site.addsitedir("...path.../python3.4")
Any other suggestions?
How does reinstalling Python
affect usage PyQT5
?
source to share
This is an error caused by having two different versions of Qt under the same installation / environment.
Check the installed packages and their versions in your environment (if for some reason you are not working in a virtual environment, you can skip the first line):
source activate yourenvname
conda list
If you see pyqt
and qt
how with the version 4.X.X
then remove them (if you want to work in Qt v5):
conda remove qt
conda remove pyqt
source to share