I am trying to build my app with --onefile option by pyinstaller. Here is the extract.
import sys
from PyQt4 import QtGui, QtCore
from modules.login import L
i just had a similar problem, once i ran pyinstaller --onedir main.py, i got that error.
i copied the Qt5core.dll in the same folder as the generated .exe to the \PyQt\bin folder and everything was working well.
There is a bug in the current version of PyInstaller that causes this problem. See this ticket for more details.
The good news is that it's been fixed. The bad news is that it's only arriving in PyInstaller 2.2. In the mean time, you could try installing a development build of PyInstaller to solve this issue.