Reputation: 315
I use Windows 7 and Python 3.4 (32bit). I installed PyQt5 and proceeded watching tutorials on how to use the module. However, the tutorial used PyQt4 instead and I faced problems. So, I decided to switch from PyQt5 to the older, PyQt4. I installed PyQt5 using the Windows Installers.
When I proceeded to install PyQt4, it gives me this error message: A copy of PyQt5 for Python v3.4 is installed in C:\Python34 and must be uninstalled first.
After checking the documentation, it said that we couldn't have both PyQt4 and PyQt5 installed at the same time, unless we built from source. I'm not sure how to build from source on Windows but after trying(extracting sip, running configure.py; extracting PyQt4, running configure-ng.py/configure.py) I still get a bunch of errors namely:
something Qmake related
Import Error: No module named sipconfig.
I gave up trying to build from source and instead just wanted to uninstall PyQt5 so I could use PyQt4. I deleted the sip folder and PyQt4 from the botched installation first. Then, I deleted PyQt5 itself from site-packages as well as qt.conf in C:\Python34.
Running the binaries for PyQt4 still gives me the PyQt5 is installed error message. How do I uninstall PyQt5 completely so that I can install PyQt4? Thanks.
Upvotes: 3
Views: 41529
Reputation: 315
I installed PyQt5 again using the installer and the used the uninstall.exe provided in the PyQt5 folder in site-packages. I hope this solution is helpful for others such as those here.
Uninstall using uninstall.exe which is provided in your PyQt4/5 folder in site-packages. If you already deleted the folder, just reinstall it with the .exe you first used and try again.
Upvotes: 4