问题
I use Anaconda3 5.2.0 and jupyter notebook(python3)(Window10)
I made a file through 'pyinstaller'. But when I play file that I made, It has some Error.\
there are qwindows, qoffscreen, qminimal, qdirect2d .dall in platforms folder
============================================================================= qt.qpa.plugin: Could not load the Qt platform plugin "windows" in "" even though it was found. This application failed to start because no Qt platform plugin could be initialized.
Reinstalling the application may fix this problem.
Available platform plugins are: minimal, offscreen, windows.
===========================================================================
The list that I tried
conda update qt
Copy Anaconda3\Library\plugins\platforms folder to Anaconda3
reinstall Anaconda3
reinstall PyQt5
回答1:
I had a similar problem. With Anaconda, you need to bundle the platforms directory with your frozen application. I do it as follows:
def get_include_files():
file_list = []
d = os.path.abspath('C:\Anaconda2\envs\py3k\Library\plugins\platforms') #You need to change this
file_list.append(d)
#file_list.append('images')
return file_list
Then in setup.py, just add these files as follows:
'build_exe': {
'include_files': get_include_files()
},
来源:https://stackoverflow.com/questions/53237963/how-to-run-qt-platform-plugin-on-windows