Error: Could not find or load the Qt platform plugin “windows” - PyQt + Pyinstaller

后端 未结 3 1981
天命终不由人
天命终不由人 2021-02-20 11:58

I am trying to bundle a PyQt project using Pyinstaller. I tried creating package using command pyinstaller --onedir Hello.py.

This creates dist folder and h

3条回答
  •  没有蜡笔的小新
    2021-02-20 12:36

    If you using python 3.4 and pip refuses to install pyqt5

    Download and install

    Pyqt5 manually to %your python 3.4 dir%

    Create directory

    Go to %your python 3.4 dir%\Lib\site-packages\PyQt5 create directory Qt and then move plugins folder there.

    Add plugins

    Then you can add ('C:/Python34-32/Lib/site-packages/PyQt5/Qt/plugins', 'PyQt5/Qt/plugins') to data in your spec file.

    be sure to download PyQt 5.4.1 or other version that supports python 3.4

    At least that solved my problem. I hope this will help somebody

提交回复
热议问题