Python 2.7 Cannot Import Pyqt4

Python 2.7 cannot import PyQt4

Under Ubuntu system, you could install it via apt-get

apt-get install python-qt4

Cannot import PyQt4.QtGui

Add the the PyQt4 directory containing Qt's applications and DLLs to your PATH environment variable. In PowerShell, provided you didn't change any of your install paths, that'd be

$env:path += ';C:\Python26\Lib\site-packages\PyQt4\bin'

python, can't import modules from PyQt4

I resolved the issue! there was a duplicated PyQt4 in my python folder than I tried to installed before and failed . when I removed that duplicate folder and uninstalled my older python version it worked nicely now

Why I can't import Pyqt in python after install it?

Did you try forcing re-installation?

pip install --force-reinstall PyQt4-4.11.4-cp27-none-win_amd64.whl

or

pip install --upgrade --no-deps --force-reinstall PyQt4-4.11.4-cp27-none-win_amd64.whl


Related Topics



Leave a reply



Submit