Exception: Impossible de trouver PyQt5 plugin répertoires lors de l'utilisation de Pyinstaller malgré PyQt5 pas encore utilisé

Il y a un mois, j'ai résolu mon application reposant gel questions pour Python 2.7 comme vous pouvez le voir ici. Depuis, j'ai adapté mon code python 3.5 (à l'aide d'Anaconda) et il semble fonctionner. n'a pas pu obtenir pyinstaller de travail avec l'Anaconda donc passé à essayer de générer un .exe en utilisant le standard de Python 3.5 compilateur. Je suis en utilisant les mêmes paramètres que dans le lien ci-dessus (pyinstaller --additional-hooks-dir=. --clean --win-private-assemblies pipegui.py), sauf que je reçois le message d'erreur suivant à la place:

`Exception: Cannot find PyQt5 plugin directories`

Cette peut être lié? Sauf que je suis en utilisant Pyinstaller et je n'ai pas de setup.py donc ne sais pas comment je peut faire usage de la solution il y a, si

Je trouve ce message d'erreur bizarre parce que je ne suis pas à l'aide de PyQt5, mais PyQt4. Voici l'intégralité de sortie:

C:\Users\Cornelis Dirk Haupt\PycharmProjects\Mesoscale-Brain-Explorer\src>pyinstaller --additional-hooks-dir=. --clean --win-private-assemblies pipegui.py
62 INFO: PyInstaller: 3.2
62 INFO: Python: 3.5.0
62 INFO: Platform: Windows-10.0.14393
62 INFO: wrote C:\Users\Cornelis Dirk Haupt\PycharmProjects\Mesoscale-Brain-Explorer\src\pipegui.spec
62 INFO: UPX is not available.
62 INFO: Removing temporary files and cleaning cache in C:\Users\Cornelis Dirk Haupt\AppData\Roaming\pyinstaller
62 INFO: Extending PYTHONPATH with paths
['C:\\Users\\Cornelis Dirk Haupt\\PycharmProjects\\Mesoscale-Brain-Explorer',
'C:\\Users\\Cornelis Dirk '
'Haupt\\PycharmProjects\\Mesoscale-Brain-Explorer\\src']
62 INFO: checking Analysis
62 INFO: Building Analysis because out00-Analysis.toc is non existent
62 INFO: Initializing module dependency graph...
62 INFO: Initializing module graph hooks...
62 INFO: Analyzing base_library.zip ...
1430 INFO: running Analysis out00-Analysis.toc
1727 WARNING: Can not get binary dependencies for file: C:\Anaconda3\api-ms-win-crt-math-l1-1-0.dll
Traceback (most recent call last):
File "c:\users\cornelis dirk haupt\appdata\local\programs\python\python35\lib\site-packages\PyInstaller\depend\bindepend.py", line 695, in getImports
return _getImports_pe(pth)
File "c:\users\cornelis dirk haupt\appdata\local\programs\python\python35\lib\site-packages\PyInstaller\depend\bindepend.py", line 122, in _getImports_pe
dll, _ = sym.forwarder.split('.')
TypeError: a bytes-like object is required, not 'str'
1742 WARNING: Can not get binary dependencies for file: C:\Anaconda3\api-ms-win-crt-runtime-l1-1-0.dll
Traceback (most recent call last):
File "c:\users\cornelis dirk haupt\appdata\local\programs\python\python35\lib\site-packages\PyInstaller\depend\bindepend.py", line 695, in getImports
return _getImports_pe(pth)
File "c:\users\cornelis dirk haupt\appdata\local\programs\python\python35\lib\site-packages\PyInstaller\depend\bindepend.py", line 122, in _getImports_pe
dll, _ = sym.forwarder.split('.')
TypeError: a bytes-like object is required, not 'str'
1742 WARNING: Can not get binary dependencies for file: C:\Anaconda3\api-ms-win-crt-locale-l1-1-0.dll
Traceback (most recent call last):
File "c:\users\cornelis dirk haupt\appdata\local\programs\python\python35\lib\site-packages\PyInstaller\depend\bindepend.py", line 695, in getImports
return _getImports_pe(pth)
File "c:\users\cornelis dirk haupt\appdata\local\programs\python\python35\lib\site-packages\PyInstaller\depend\bindepend.py", line 122, in _getImports_pe
dll, _ = sym.forwarder.split('.')
TypeError: a bytes-like object is required, not 'str'
1758 WARNING: Can not get binary dependencies for file: C:\Anaconda3\api-ms-win-crt-stdio-l1-1-0.dll
Traceback (most recent call last):
File "c:\users\cornelis dirk haupt\appdata\local\programs\python\python35\lib\site-packages\PyInstaller\depend\bindepend.py", line 695, in getImports
return _getImports_pe(pth)
File "c:\users\cornelis dirk haupt\appdata\local\programs\python\python35\lib\site-packages\PyInstaller\depend\bindepend.py", line 122, in _getImports_pe
dll, _ = sym.forwarder.split('.')
TypeError: a bytes-like object is required, not 'str'
1758 WARNING: Can not get binary dependencies for file: C:\Anaconda3\api-ms-win-crt-heap-l1-1-0.dll
Traceback (most recent call last):
File "c:\users\cornelis dirk haupt\appdata\local\programs\python\python35\lib\site-packages\PyInstaller\depend\bindepend.py", line 695, in getImports
return _getImports_pe(pth)
File "c:\users\cornelis dirk haupt\appdata\local\programs\python\python35\lib\site-packages\PyInstaller\depend\bindepend.py", line 122, in _getImports_pe
dll, _ = sym.forwarder.split('.')
TypeError: a bytes-like object is required, not 'str'
1774 WARNING: Can not get binary dependencies for file: C:\Anaconda3\api-ms-win-crt-string-l1-1-0.dll
Traceback (most recent call last):
File "c:\users\cornelis dirk haupt\appdata\local\programs\python\python35\lib\site-packages\PyInstaller\depend\bindepend.py", line 695, in getImports
return _getImports_pe(pth)
File "c:\users\cornelis dirk haupt\appdata\local\programs\python\python35\lib\site-packages\PyInstaller\depend\bindepend.py", line 122, in _getImports_pe
dll, _ = sym.forwarder.split('.')
TypeError: a bytes-like object is required, not 'str'
1774 WARNING: Can not get binary dependencies for file: C:\Anaconda3\api-ms-win-crt-environment-l1-1-0.dll
Traceback (most recent call last):
File "c:\users\cornelis dirk haupt\appdata\local\programs\python\python35\lib\site-packages\PyInstaller\depend\bindepend.py", line 695, in getImports
return _getImports_pe(pth)
File "c:\users\cornelis dirk haupt\appdata\local\programs\python\python35\lib\site-packages\PyInstaller\depend\bindepend.py", line 122, in _getImports_pe
dll, _ = sym.forwarder.split('.')
TypeError: a bytes-like object is required, not 'str'
1774 WARNING: Can not get binary dependencies for file: C:\Anaconda3\api-ms-win-crt-time-l1-1-0.dll
Traceback (most recent call last):
File "c:\users\cornelis dirk haupt\appdata\local\programs\python\python35\lib\site-packages\PyInstaller\depend\bindepend.py", line 695, in getImports
return _getImports_pe(pth)
File "c:\users\cornelis dirk haupt\appdata\local\programs\python\python35\lib\site-packages\PyInstaller\depend\bindepend.py", line 122, in _getImports_pe
dll, _ = sym.forwarder.split('.')
TypeError: a bytes-like object is required, not 'str'
1789 WARNING: Can not get binary dependencies for file: C:\Anaconda3\api-ms-win-crt-filesystem-l1-1-0.dll
Traceback (most recent call last):
File "c:\users\cornelis dirk haupt\appdata\local\programs\python\python35\lib\site-packages\PyInstaller\depend\bindepend.py", line 695, in getImports
return _getImports_pe(pth)
File "c:\users\cornelis dirk haupt\appdata\local\programs\python\python35\lib\site-packages\PyInstaller\depend\bindepend.py", line 122, in _getImports_pe
dll, _ = sym.forwarder.split('.')
TypeError: a bytes-like object is required, not 'str'
1789 WARNING: Can not get binary dependencies for file: C:\Anaconda3\api-ms-win-crt-conio-l1-1-0.dll
Traceback (most recent call last):
File "c:\users\cornelis dirk haupt\appdata\local\programs\python\python35\lib\site-packages\PyInstaller\depend\bindepend.py", line 695, in getImports
return _getImports_pe(pth)
File "c:\users\cornelis dirk haupt\appdata\local\programs\python\python35\lib\site-packages\PyInstaller\depend\bindepend.py", line 122, in _getImports_pe
dll, _ = sym.forwarder.split('.')
TypeError: a bytes-like object is required, not 'str'
1789 WARNING: Can not get binary dependencies for file: C:\Anaconda3\api-ms-win-crt-process-l1-1-0.dll
Traceback (most recent call last):
File "c:\users\cornelis dirk haupt\appdata\local\programs\python\python35\lib\site-packages\PyInstaller\depend\bindepend.py", line 695, in getImports
return _getImports_pe(pth)
File "c:\users\cornelis dirk haupt\appdata\local\programs\python\python35\lib\site-packages\PyInstaller\depend\bindepend.py", line 122, in _getImports_pe
dll, _ = sym.forwarder.split('.')
TypeError: a bytes-like object is required, not 'str'
1805 WARNING: Can not get binary dependencies for file: C:\Anaconda3\api-ms-win-crt-convert-l1-1-0.dll
Traceback (most recent call last):
File "c:\users\cornelis dirk haupt\appdata\local\programs\python\python35\lib\site-packages\PyInstaller\depend\bindepend.py", line 695, in getImports
return _getImports_pe(pth)
File "c:\users\cornelis dirk haupt\appdata\local\programs\python\python35\lib\site-packages\PyInstaller\depend\bindepend.py", line 122, in _getImports_pe
dll, _ = sym.forwarder.split('.')
TypeError: a bytes-like object is required, not 'str'
1805 INFO: Caching module hooks...
1805 INFO: Analyzing C:\Users\Cornelis Dirk Haupt\PycharmProjects\Mesoscale-Brain-Explorer\src\pipegui.py
1992 INFO: Processing pre-find module path hook   distutils
2055 INFO: Processing pre-safe import module hook   six.moves
3181 INFO: Processing pre-find module path hook   site
3181 INFO: site: retargeting to fake-dir 'c:\\users\\cornelis dirk haupt\\appdata\\local\\programs\\python\\python35\\lib\\site-packages\\PyInstaller\\fake-modules'
4298 INFO: Processing pre-safe import module hook   win32com
9975 INFO: Loading module hooks...
9975 INFO: Loading module hook "hook-_tkinter.py"...
10121 INFO: checking Tree
10121 INFO: Building Tree because out00-Tree.toc is non existent
10122 INFO: Building Tree out00-Tree.toc
10184 INFO: checking Tree
10184 INFO: Building Tree because out01-Tree.toc is non existent
10185 INFO: Building Tree out01-Tree.toc
10198 INFO: Loading module hook "hook-matplotlib.py"...
10404 INFO: Loading module hook "hook-pywintypes.py"...
10526 INFO: Loading module hook "hook-xml.py"...
10526 INFO: Loading module hook "hook-pydoc.py"...
10527 INFO: Loading module hook "hook-scipy.linalg.py"...
10527 INFO: Loading module hook "hook-scipy.sparse.csgraph.py"...
10529 INFO: Loading module hook "hook-plugins.py"...
10721 INFO: Processing pre-find module path hook   PyQt4.uic.port_v3
10726 INFO: Processing pre-find module path hook   PyQt4.uic.port_v2
12402 INFO: Loading module hook "hook-OpenGL.py"...
12583 INFO: Loading module hook "hook-PyQt4.QtGui.py"...
12802 INFO: Loading module hook "hook-encodings.py"...
12807 INFO: Loading module hook "hook-PyQt4.uic.py"...
12812 INFO: Loading module hook "hook-PyQt5.QtWidgets.py"...
12813 INFO: Loading module hook "hook-xml.etree.cElementTree.py"...
12813 INFO: Loading module hook "hook-setuptools.py"...
12814 INFO: Loading module hook "hook-scipy.special._ufuncs.py"...
12814 INFO: Loading module hook "hook-PyQt5.QtCore.py"...
Traceback (most recent call last):
File "<string>", line 2, in <module>
ImportError: DLL load failed: The specified procedure could not be found.
Traceback (most recent call last):
File "c:\users\cornelis dirk haupt\appdata\local\programs\python\python35\lib\runpy.py", line 170, in _run_module_as_main
"__main__", mod_spec)
File "c:\users\cornelis dirk haupt\appdata\local\programs\python\python35\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\Cornelis Dirk Haupt\AppData\Local\Programs\Python\Python35\Scripts\pyinstaller.exe\__main__.py", line 9, in <module>
File "c:\users\cornelis dirk haupt\appdata\local\programs\python\python35\lib\site-packages\PyInstaller\__main__.py", line 90, in run
run_build(pyi_config, spec_file, **vars(args))
File "c:\users\cornelis dirk haupt\appdata\local\programs\python\python35\lib\site-packages\PyInstaller\__main__.py", line 46, in run_build
PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
File "c:\users\cornelis dirk haupt\appdata\local\programs\python\python35\lib\site-packages\PyInstaller\building\build_main.py", line 788, in main
build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'))
File "c:\users\cornelis dirk haupt\appdata\local\programs\python\python35\lib\site-packages\PyInstaller\building\build_main.py", line 734, in build
exec(text, spec_namespace)
File "<string>", line 16, in <module>
File "c:\users\cornelis dirk haupt\appdata\local\programs\python\python35\lib\site-packages\PyInstaller\building\build_main.py", line 212, in __init__
self.__postinit__()
File "c:\users\cornelis dirk haupt\appdata\local\programs\python\python35\lib\site-packages\PyInstaller\building\datastruct.py", line 178, in __postinit__
self.assemble()
File "c:\users\cornelis dirk haupt\appdata\local\programs\python\python35\lib\site-packages\PyInstaller\building\build_main.py", line 470, in assemble
module_hook.post_graph()
File "c:\users\cornelis dirk haupt\appdata\local\programs\python\python35\lib\site-packages\PyInstaller\building\imphook.py", line 409, in post_graph
self._load_hook_module()
File "c:\users\cornelis dirk haupt\appdata\local\programs\python\python35\lib\site-packages\PyInstaller\building\imphook.py", line 376, in _load_hook_module
self.hook_module_name, self.hook_filename)
File "c:\users\cornelis dirk haupt\appdata\local\programs\python\python35\lib\site-packages\PyInstaller\compat.py", line 725, in importlib_load_source
return mod_loader.load_module()
File "<frozen importlib._bootstrap_external>", line 385, in _check_name_wrapper
File "<frozen importlib._bootstrap_external>", line 806, in load_module
File "<frozen importlib._bootstrap_external>", line 665, in load_module
File "<frozen importlib._bootstrap>", line 268, in _load_module_shim
File "<frozen importlib._bootstrap>", line 693, in _load
File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 662, in exec_module
File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
File "c:\users\cornelis dirk haupt\appdata\local\programs\python\python35\lib\site-packages\PyInstaller\hooks\hook-PyQt5.QtCore.py", line 15, in <module>
binaries = qt_plugins_binaries('codecs', namespace='PyQt5')
File "c:\users\cornelis dirk haupt\appdata\local\programs\python\python35\lib\site-packages\PyInstaller\utils\hooks\qt.py", line 64, in qt_plugins_binaries
pdir = qt_plugins_dir(namespace=namespace)
File "c:\users\cornelis dirk haupt\appdata\local\programs\python\python35\lib\site-packages\PyInstaller\utils\hooks\qt.py", line 38, in qt_plugins_dir
raise Exception('Cannot find {0} plugin directories'.format(namespace))
Exception: Cannot find PyQt5 plugin directories

Je vais dire, je n'ai aucune idée de quoi faire de la TypeError: a bytes-like object is required, not 'str'Cette peut être lié? Je n'utilise que le mode binaire avec pickle une poignée de fois plus loin que je peux dire c'est ma seule utilisation:

pickle.dump( roiState, open( fileName, "wb" ) )
roiState = pickle.load(open(fileName, "rb"))

Je n'ai pas d'erreurs quand je lance l'application, seulement l'obtention de ces erreurs lorsque vous essayez de générer un .exe à l'aide de pyinstaller. Pourquoi?

Note également que Anaconda3 ne pop-up dans le traceback ci-dessus (pourquoi est-il à la recherche pour les fichiers binaires?) mais j':

  1. Désinstallé pyinstaller de Anaconda
  2. Suis en utilisant le standard de Python 3.5 (64-bit) compilateur

Seule chose que je peux penser à ce que peut être le coupable, c'est que je ne suis plus à l'aide de la version développeur de Pyinstaller (il vient de télévision ne fonctionne pas en Python 3.5). J'ai dû utiliser la version développeur pour résoudre mon problème de gel ici quand mon code a été écrit pour python 2.7

OriginalL'auteur Frikster | 2016-09-27