How to install PyQt4 on anaconda python 2 on Windows:
At first I have tried to isntall pyqt4 via pip install
:
C:\Users\myuser\Anaconda2\Scripts\pip.exe search pyqt4 > pyqt4.txt
It shows:
PyQt4 (4.11.4) - Python bindings for the Qt cross platform GUI toolkit
But when I tried to install, it gives an error:
C:\Users\myuser\Anaconda2\Scripts\pip.exe install PyQt4
Collecting PyQt4
Could not find a version that satisfies the requirement PyQt4 (from versions:
)
No matching distribution found for PyQt4
Seems this answer is realated to this problem: https://superuser.com/a/725869/213959
Then I have tried to install it via conda install
( How to install PyQt4 in anaconda? ) :
C:\Users\myuser\Anaconda2\Scripts\conda.exe search pyqt
It shows:
pyqt 4.10.4 py26_0 defaults
4.10.4 py27_0 defaults
4.10.4 py33_0 defaults
4.10.4 py34_0 defaults
4.10.4 py26_1 defaults
4.10.4 py27_1 defaults
4.10.4 py33_1 defaults
4.10.4 py34_1 defaults
4.11.4 py27_0 defaults
4.11.4 py35_0 defaults
4.11.4 py27_2 defaults
4.11.4 py34_2 defaults
4.11.4 py35_2 defaults
4.11.4 py27_3 defaults
4.11.4 py34_3 defaults
4.11.4 py35_3 defaults
4.11.4 py27_4 defaults
4.11.4 py34_4 defaults
4.11.4 py35_4 defaults
4.11.4 py27_5 defaults
4.11.4 py34_5 defaults
4.11.4 py35_5 defaults
4.11.4 py27_6 defaults
4.11.4 py34_6 defaults
4.11.4 py35_6 defaults
4.11.4 py27_7 defaults
4.11.4 py34_7 defaults
4.11.4 py35_7 defaults
5.6.0 py27_0 defaults
5.6.0 py34_0 defaults
5.6.0 py35_0 defaults
5.6.0 py27_1 defaults
5.6.0 py34_1 defaults
5.6.0 py35_1 defaults
5.6.0 py27_2 defaults
5.6.0 py34_2 defaults
5.6.0 py35_2 defaults
5.6.0 py36_2 defaults
5.6.0 py27h224ed30_5 defaults
5.6.0 py35hd46907b_5 defaults
5.6.0 py36hb5ed885_5 defaults
But it gives error:
C:\Users\myuser\Anaconda2\Scripts\conda.exe install pyqt=4.11.4
Fetching package metadata .............
Solving package specifications: .
UnsatisfiableError: The following specifications were found to be in conflict:
- navigator-updater -> pyqt >=5.6 -> qt 5.6.*
- pyqt 4.11.4* -> qt >=4.8.6,<5.0
- pyqt 4.11.4* -> sip >=4.16.4,<4.18
Use "conda info <package>" to see the dependencies for each package.
Same with -c
parameter:
C:\Users\myuser\Anaconda2\Scripts\conda.exe install -c anaconda pyqt=4.11.4
Fetching package metadata ...............
Solving package specifications: .
UnsatisfiableError: The following specifications were found to be in conflict:
- navigator-updater -> pyqt >=5.6 -> qt 5.6.*
- pyqt 4.11.4* -> qt >=4.8.6,<5.0
- pyqt 4.11.4* -> sip >=4.16.4,<4.18
Use "conda info <package>" to see the dependencies for each package.
Then I tried to uninstall pyqt
:
C:\Users\myuser\Anaconda2\Scripts\conda.exe uninstall pyqt
And installed it again:
C:\Users\myuser\Anaconda2\Scripts\conda.exe install -c anaconda pyqt=4.11.4
And finnaly it works!