Python3.5+PYQT5:ModuleNotFoundError: No module named 'PyQt5'
python3.5+pycharm+pyqt5使用PyUIC时,报出标题所示错误,如图所示pycharm中,pyuic配置如图系统环境变量配置如图求解~...
python3.5+pycharm+pyqt5使用PyUIC时,报出标题所示错误,如图所示pycharm中,pyuic配置如图系统环境变量配置如图求解~
展开
1个回答
展开全部
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.
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.
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询