Python3.5+PYQT5:ModuleNotFoundError: No module named 'PyQt5'

发布网友 发布时间:2022-04-21 08:24

我来回答

1个回答

热心网友 时间:2023-11-07 18:17

Okay, I hammered at this until I finally found a solution. It seems like this might be a bug in the PyQt library installation or somewhere else. I created a $PYTHONPATH environment variable to point to the newly installed PyQt .py files that hold references to the all of the Qt bindings.
export set PYTHONPATH=$PYTHONPATH:/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages

After that, everything worked like magic. This includes PyCharm after going to Settings->Project Interpreter->Python Interpreters->Paths (tab), and clicking the "Reload list of paths" button with the blue circular arrows on the bottom.
声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。
E-MAIL:11247931@qq.com
Top