Anaconda installs pyqt4 but gets ImportError: No module named PyQt4

Asked 2 years ago, Updated 2 years ago, 200 views

Obviously, PyQt4 looks like it's possible, but I'm having trouble getting a no module.
There is no pyqt4 in the pip list.
It is on the conda list.

hogenoMacBook-puro:~hoge$pyuic4
Traceback (most recent call last):
  File"/Users/hoge/.pyenv/versions/anaconda-4.0.0/lib/python 2.7/site-packages/PyQt4/uic/pyuic.py", line 26, in <module>
    from PyQt4 import QtCore
ImportError: No module named PyQt4

Run Environment
mac
Python 2.7.3
Anaconda 4.0.0

python macos anaconda pyqt pyenv

2022-09-30 21:48

1 Answers

Additional
It has been resolved as follows.Thank you.

$conda install pyqt=4 
$ export PYTHONPATH=$HOME/.pyenv/versions/anaconda-4.0.0/lib/python 2.7/site-packages


2022-09-30 21:48

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.