PyInstaller; “could not find or load the Qt platform plugin ”windows"

后端 未结 4 935
轮回少年
轮回少年 2021-02-06 00:31

My PyInstaller spec:

# -*- mode: python -*-

block_cipher = None


a = Analysis([\'test.py\'],
             pathex=[\'C:\\\\Users\\\\admin\\\\compile\'],
                


        
4条回答
  •  耶瑟儿~
    2021-02-06 01:09

    There seem to be two solutions, the first one worked fine for me:

    • copy platform directory to directory of your executable. You'll find the platform directory at a location like c:\Users\\envs\\Library\plugins\platforms or

    • Upgrade to a newer version of pyqt: conda install -c anaconda pyqt

    Use the second option with care: Do not try to use pip for pyqt installation if you have a conda environment, this might break your conda installation: https://github.com/ContinuumIO/anaconda-issues/issues/1970

提交回复
热议问题