2016-08-19 134 views
0

私は、棒グラフを作成する簡単なプログラムをPythonで構築しています。さらに複雑なバージョンをビルドしたいので、それは他のPC(Pythonがインストールされていない場所)で使用されるため、.exeを作成する必要があります。実行可能ファイルを作成するために、pyinstallerを使用しています。 Pyinstallerは問題なく動作し、実行可能ファイルを作成します。しかし、私はそれを実行したときに、私は次のエラーました:君たちは、任意のアイデアはどのようにそれを解決するためにpyinstallerとmatplotlib - executring中にエラーが発生する

Traceback (most recent call last): 
File "PyInstaller\loader\rthooks\pyi_rth_pkgres.py", line 11, in <module> 
File "C:\Users\310251823\AppData\Local\Continuum\Anaconda3\lib\site-packages\pyinstaller-3.2-py3.5.egg\PyInstaller\loader\pyimod03_importers.py", line 389, in load_module exec(bytecode, module.__dict__) 
File "pkg_resources\__init__.py", line 68, in <module> 
File "pkg_resources\extern\__init__.py", line 60, in load_module 
ImportError: The 'packaging' package is required; normally this is bundled with this package so if you get this warning, consult the packager of your distribution.Failed to execute script pyi_rth_pkgres 

を持っていますか? ここではソースコード:

import matplotlib.pyplot as plt 

A = [5., 30., 45., 22.] 
B = [5., 25., 50., 20.] 
X = range(4) 
plt.bar(X, A, color = 'b') 
plt.bar(X,B, color = 'r', bottom = A) 
plt.show() 

、ここpyInstallerのの出力ログは:

223 INFO: PyInstaller: 3.2 
223 INFO: Python: 3.5.2 
223 INFO: Platform: Windows-7-6.1.7601-SP1 
226 INFO: wrote C:\Users\310251823\PycharmProjects\Prove1\Prova.spec 
243 INFO: UPX is not available. 
251 INFO: Extending PYTHONPATH with paths 
['C:\\Users\\310251823\\PycharmProjects\\Prove1', 
'C:\\Users\\310251823\\PycharmProjects\\Prove1'] 
251 INFO: checking Analysis 
252 INFO: Building Analysis because out00-Analysis.toc is non existent 
252 INFO: Initializing module dependency graph... 
255 INFO: Initializing module graph hooks... 
256 INFO: Analyzing base_library.zip ... 
4572 INFO: running Analysis out00-Analysis.toc 
4646 WARNING: Can not get binary dependencies for file: C:\Users\310251823\AppData\Local\Continuum\Anaconda3\api-ms-win-crt-stdio-l1-1-0.dll 
Traceback (most recent call last): 
    File "C:\Users\310251823\AppData\Local\Continuum\Anaconda3\lib\site-packages\pyinstaller-3.2-py3.5.egg\PyInstaller\depend\bindepend.py", line 695, in getImports 
    return _getImports_pe(pth) 
    File "C:\Users\310251823\AppData\Local\Continuum\Anaconda3\lib\site-packages\pyinstaller-3.2-py3.5.egg\PyInstaller\depend\bindepend.py", line 122, in _getImports_pe 
    dll, _ = sym.forwarder.split('.') 
TypeError: a bytes-like object is required, not 'str' 
4652 WARNING: Can not get binary dependencies for file: C:\Users\310251823\AppData\Local\Continuum\Anaconda3\api-ms-win-crt-heap-l1-1-0.dll 
Traceback (most recent call last): 
    File "C:\Users\310251823\AppData\Local\Continuum\Anaconda3\lib\site-packages\pyinstaller-3.2-py3.5.egg\PyInstaller\depend\bindepend.py", line 695, in getImports 
    return _getImports_pe(pth) 
    File "C:\Users\310251823\AppData\Local\Continuum\Anaconda3\lib\site-packages\pyinstaller-3.2-py3.5.egg\PyInstaller\depend\bindepend.py", line 122, in _getImports_pe 
    dll, _ = sym.forwarder.split('.') 
TypeError: a bytes-like object is required, not 'str' 
4657 WARNING: Can not get binary dependencies for file: C:\Users\310251823\AppData\Local\Continuum\Anaconda3\api-ms-win-crt-locale-l1-1-0.dll 
Traceback (most recent call last): 
    File "C:\Users\310251823\AppData\Local\Continuum\Anaconda3\lib\site-packages\pyinstaller-3.2-py3.5.egg\PyInstaller\depend\bindepend.py", line 695, in getImports 
    return _getImports_pe(pth) 
    File "C:\Users\310251823\AppData\Local\Continuum\Anaconda3\lib\site-packages\pyinstaller-3.2-py3.5.egg\PyInstaller\depend\bindepend.py", line 122, in _getImports_pe 
    dll, _ = sym.forwarder.split('.') 
TypeError: a bytes-like object is required, not 'str' 
4689 WARNING: Can not get binary dependencies for file: C:\Users\310251823\AppData\Local\Continuum\Anaconda3\api-ms-win-crt-math-l1-1-0.dll 
Traceback (most recent call last): 
    File "C:\Users\310251823\AppData\Local\Continuum\Anaconda3\lib\site-packages\pyinstaller-3.2-py3.5.egg\PyInstaller\depend\bindepend.py", line 695, in getImports 
    return _getImports_pe(pth) 
    File "C:\Users\310251823\AppData\Local\Continuum\Anaconda3\lib\site-packages\pyinstaller-3.2-py3.5.egg\PyInstaller\depend\bindepend.py", line 122, in _getImports_pe 
    dll, _ = sym.forwarder.split('.') 
TypeError: a bytes-like object is required, not 'str' 
4703 WARNING: Can not get binary dependencies for file: C:\Users\310251823\AppData\Local\Continuum\Anaconda3\api-ms-win-crt-runtime-l1-1-0.dll 
Traceback (most recent call last): 
    File "C:\Users\310251823\AppData\Local\Continuum\Anaconda3\lib\site-packages\pyinstaller-3.2-py3.5.egg\PyInstaller\depend\bindepend.py", line 695, in getImports 
    return _getImports_pe(pth) 
    File "C:\Users\310251823\AppData\Local\Continuum\Anaconda3\lib\site-packages\pyinstaller-3.2-py3.5.egg\PyInstaller\depend\bindepend.py", line 122, in _getImports_pe 
    dll, _ = sym.forwarder.split('.') 
TypeError: a bytes-like object is required, not 'str' 
5129 WARNING: Can not get binary dependencies for file: C:\Users\310251823\AppData\Local\Continuum\Anaconda3\api-ms-win-crt-time-l1-1-0.dll 
Traceback (most recent call last): 
    File "C:\Users\310251823\AppData\Local\Continuum\Anaconda3\lib\site-packages\pyinstaller-3.2-py3.5.egg\PyInstaller\depend\bindepend.py", line 695, in getImports 
    return _getImports_pe(pth) 
    File "C:\Users\310251823\AppData\Local\Continuum\Anaconda3\lib\site-packages\pyinstaller-3.2-py3.5.egg\PyInstaller\depend\bindepend.py", line 122, in _getImports_pe 
    dll, _ = sym.forwarder.split('.') 
TypeError: a bytes-like object is required, not 'str' 
5134 WARNING: Can not get binary dependencies for file: C:\Users\310251823\AppData\Local\Continuum\Anaconda3\api-ms-win-crt-conio-l1-1-0.dll 
Traceback (most recent call last): 
    File "C:\Users\310251823\AppData\Local\Continuum\Anaconda3\lib\site-packages\pyinstaller-3.2-py3.5.egg\PyInstaller\depend\bindepend.py", line 695, in getImports 
    return _getImports_pe(pth) 
    File "C:\Users\310251823\AppData\Local\Continuum\Anaconda3\lib\site-packages\pyinstaller-3.2-py3.5.egg\PyInstaller\depend\bindepend.py", line 122, in _getImports_pe 
    dll, _ = sym.forwarder.split('.') 
TypeError: a bytes-like object is required, not 'str' 
5160 WARNING: Can not get binary dependencies for file: C:\Users\310251823\AppData\Local\Continuum\Anaconda3\api-ms-win-crt-string-l1-1-0.dll 
Traceback (most recent call last): 
    File "C:\Users\310251823\AppData\Local\Continuum\Anaconda3\lib\site-packages\pyinstaller-3.2-py3.5.egg\PyInstaller\depend\bindepend.py", line 695, in getImports 
    return _getImports_pe(pth) 
    File "C:\Users\310251823\AppData\Local\Continuum\Anaconda3\lib\site-packages\pyinstaller-3.2-py3.5.egg\PyInstaller\depend\bindepend.py", line 122, in _getImports_pe 
    dll, _ = sym.forwarder.split('.') 
TypeError: a bytes-like object is required, not 'str' 
5169 WARNING: Can not get binary dependencies for file: C:\Users\310251823\AppData\Local\Continuum\Anaconda3\api-ms-win-crt-process-l1-1-0.dll 
Traceback (most recent call last): 
    File "C:\Users\310251823\AppData\Local\Continuum\Anaconda3\lib\site-packages\pyinstaller-3.2-py3.5.egg\PyInstaller\depend\bindepend.py", line 695, in getImports 
    return _getImports_pe(pth) 
    File "C:\Users\310251823\AppData\Local\Continuum\Anaconda3\lib\site-packages\pyinstaller-3.2-py3.5.egg\PyInstaller\depend\bindepend.py", line 122, in _getImports_pe 
    dll, _ = sym.forwarder.split('.') 
TypeError: a bytes-like object is required, not 'str' 
5186 WARNING: Can not get binary dependencies for file: C:\Users\310251823\AppData\Local\Continuum\Anaconda3\api-ms-win-crt-convert-l1-1-0.dll 
Traceback (most recent call last): 
    File "C:\Users\310251823\AppData\Local\Continuum\Anaconda3\lib\site-packages\pyinstaller-3.2-py3.5.egg\PyInstaller\depend\bindepend.py", line 695, in getImports 
    return _getImports_pe(pth) 
    File "C:\Users\310251823\AppData\Local\Continuum\Anaconda3\lib\site-packages\pyinstaller-3.2-py3.5.egg\PyInstaller\depend\bindepend.py", line 122, in _getImports_pe 
    dll, _ = sym.forwarder.split('.') 
TypeError: a bytes-like object is required, not 'str' 
5190 WARNING: Can not get binary dependencies for file: C:\Users\310251823\AppData\Local\Continuum\Anaconda3\api-ms-win-crt-environment-l1-1-0.dll 
Traceback (most recent call last): 
    File "C:\Users\310251823\AppData\Local\Continuum\Anaconda3\lib\site-packages\pyinstaller-3.2-py3.5.egg\PyInstaller\depend\bindepend.py", line 695, in getImports 
    return _getImports_pe(pth) 
    File "C:\Users\310251823\AppData\Local\Continuum\Anaconda3\lib\site-packages\pyinstaller-3.2-py3.5.egg\PyInstaller\depend\bindepend.py", line 122, in _getImports_pe 
    dll, _ = sym.forwarder.split('.') 
TypeError: a bytes-like object is required, not 'str' 
5203 WARNING: Can not get binary dependencies for file: C:\Users\310251823\AppData\Local\Continuum\Anaconda3\api-ms-win-crt-filesystem-l1-1-0.dll 
Traceback (most recent call last): 
    File "C:\Users\310251823\AppData\Local\Continuum\Anaconda3\lib\site-packages\pyinstaller-3.2-py3.5.egg\PyInstaller\depend\bindepend.py", line 695, in getImports 
    return _getImports_pe(pth) 
    File "C:\Users\310251823\AppData\Local\Continuum\Anaconda3\lib\site-packages\pyinstaller-3.2-py3.5.egg\PyInstaller\depend\bindepend.py", line 122, in _getImports_pe 
    dll, _ = sym.forwarder.split('.') 
TypeError: a bytes-like object is required, not 'str' 
5207 INFO: Caching module hooks... 
5213 INFO: Analyzing C:\Users\310251823\PycharmProjects\Prove1\Prova.py 
5471 INFO: Processing pre-find module path hook distutils 
10751 INFO: Processing pre-find module path hook site 
10752 INFO: site: retargeting to fake-dir 'C:\\Users\\310251823\\AppData\\Local\\Continuum\\Anaconda3\\lib\\site-packages\\pyinstaller-3.2-py3.5.egg\\PyInstaller\\fake-modules' 
10772 INFO: Processing pre-safe import module hook win32com 
13072 INFO: Processing pre-safe import module hook six.moves 
28631 INFO: Loading module hooks... 
28633 INFO: Loading module hook "hook-jinja2.py"... 
28644 INFO: Loading module hook "hook-xml.dom.domreg.py"... 
28647 INFO: Loading module hook "hook-_tkinter.py"... 
28922 INFO: checking Tree 
28922 INFO: Building Tree because out00-Tree.toc is non existent 
28922 INFO: Building Tree out00-Tree.toc 
28991 INFO: checking Tree 
28991 INFO: Building Tree because out01-Tree.toc is non existent 
28992 INFO: Building Tree out01-Tree.toc 
29005 INFO: Loading module hook "hook-pythoncom.py"... 
29569 INFO: Loading module hook "hook-sqlite3.py"... 
29573 INFO: Loading module hook "hook-PyQt4.QtGui.py"... 
30078 INFO: Loading module hook "hook-jsonschema.py"... 
30082 INFO: Loading module hook "hook-win32com.py"... 
30194 INFO: Loading module hook "hook-pydoc.py"... 
30196 INFO: Loading module hook "hook-encodings.py"... 
30205 INFO: Loading module hook "hook-setuptools.py"... 
30207 INFO: Loading module hook "hook-requests.py"... 
30212 INFO: Loading module hook "hook-matplotlib.py"... 
30644 INFO: Loading module hook "hook-lib2to3.py"... 
30647 INFO: Loading module hook "hook-matplotlib.backends.py"... 
31457 INFO: Matplotlib backend "GTK": ignored 
    Gtk* backend requires pygtk to be installed. 
32068 INFO: Matplotlib backend "GTKAgg": ignored 
    Gtk* backend requires pygtk to be installed. 
32468 INFO: Matplotlib backend "GTKCairo": ignored 
    No module named 'gtk' 
33046 INFO: Matplotlib backend "MacOSX": ignored 
    cannot import name '_macosx' 
33684 INFO: Matplotlib backend "Qt4Agg": added 
34328 INFO: Matplotlib backend "Qt5Agg": added 
34923 INFO: Matplotlib backend "TkAgg": added 
35499 INFO: Matplotlib backend "WX": ignored 
    Matplotlib backend_wx and backend_wxagg require wxPython >=2.8.12 
36105 INFO: Matplotlib backend "WXAgg": ignored 
    Matplotlib backend_wx and backend_wxagg require wxPython >=2.8.12 
36529 INFO: Matplotlib backend "GTK3Cairo": ignored 
    Gtk3 backend requires pygobject to be installed. 
37143 INFO: Matplotlib backend "GTK3Agg": ignored 
    Gtk3 backend requires pygobject to be installed. 
38607 INFO: Matplotlib backend "WebAgg": added 
39577 INFO: Matplotlib backend "nbAgg": added 
40146 INFO: Matplotlib backend "agg": added 
40539 INFO: Matplotlib backend "cairo": ignored 
    Cairo backend requires that cairocffi or pycairo is installed. 
40930 INFO: Matplotlib backend "emf": ignored 
    No module named 'matplotlib.backends.backend_emf' 
41330 INFO: Matplotlib backend "gdk": ignored 
    No module named 'gobject' 
41939 INFO: Matplotlib backend "pdf": added 
42663 INFO: Matplotlib backend "pgf": added 
43259 INFO: Matplotlib backend "ps": added 
44023 INFO: Matplotlib backend "svg": added 
44768 INFO: Matplotlib backend "template": added 
45009 INFO: Loading module hook "hook-pytz.py"... 
45088 INFO: Loading module hook "hook-IPython.py"... 
45101 INFO: Excluding import 'PySide' 
45113 WARNING: Removing import IPython.external.qt_loaders from module PySide.QtSvg 
45113 WARNING: Removing import IPython.external.qt_loaders from module PySide 
45113 WARNING: Removing import IPython.external.qt_loaders from module PySide.QtGui 
45113 WARNING: Removing import IPython.external.qt_loaders from module PySide.QtCore 
45114 INFO: Excluding import 'PyQt4' 
45124 WARNING: Removing import IPython.external.qt_loaders from module PyQt4.QtCore 
45124 WARNING: Removing import IPython.external.qt_loaders from module PyQt4.QtSvg 
45124 WARNING: Removing import IPython.external.qt_loaders from module PyQt4 
45141 WARNING: Removing import IPython.external.qt_loaders from module PyQt4.QtGui 
45144 INFO: Excluding import 'matplotlib' 
45159 WARNING: Removing import IPython.core.pylabtools from module matplotlib 
45163 WARNING: Removing import IPython.core.pylabtools from module matplotlib._pylab_helpers 
45163 WARNING: Removing import IPython.core.pylabtools from module matplotlib.rcParams 
45164 WARNING: Removing import IPython.core.pylabtools from module matplotlib.pylab 
45164 WARNING: Removing import IPython.core.pylabtools from module matplotlib.figure 
45164 WARNING: Removing import IPython.core.pylabtools from module matplotlib.pyplot 
45164 WARNING: Removing import IPython.core.pylabtools from module matplotlib.figure.Figure 
45166 INFO: Excluding import 'gtk' 
45175 WARNING: Removing import IPython.lib.inputhook from module gtk 
45175 WARNING: Removing import IPython.lib.inputhookgtk from module gtk 
45177 INFO: Excluding import 'tkinter' 
45186 WARNING: Removing import IPython.lib.inputhook from module tkinter 
45189 WARNING: Removing import IPython.lib.clipboard from module tkinter 
45189 INFO: Excluding import 'PyQt5' 
45200 WARNING: Removing import IPython.external.qt_loaders from module PyQt5.QtGui 
45202 WARNING: Removing import IPython.external.qt_loaders from module PyQt5.QtCore 
45202 WARNING: Removing import IPython.external.qt_loaders from module PyQt5 
45202 WARNING: Removing import IPython.external.qt_loaders from module PyQt5.QtSvg 
45202 WARNING: Removing import IPython.external.qt_loaders from module PyQt5.QtWidgets 
45203 INFO: Loading module hook "hook-pycparser.py"... 
45358 INFO: Loading module hook "hook-pygments.py"... 
46509 INFO: Loading module hook "hook-PIL.py"... 
46514 INFO: Excluding import 'PyQt5' 
46519 WARNING: Removing import PIL.ImageQt from module PyQt5.QPixmap 
46519 WARNING: Removing import PIL.ImageQt from module PyQt5.qRgba 
46519 WARNING: Removing import PIL.ImageQt from module PyQt5.QImage 
46521 WARNING: Removing import PIL.ImageQt from module PyQt5 
46521 INFO: Excluding import 'PySide' 
46526 WARNING: Removing import PIL.ImageQt from module PySide.QImage 
46527 WARNING: Removing import PIL.ImageQt from module PySide 
46527 WARNING: Removing import PIL.ImageQt from module PySide.QPixmap 
46527 WARNING: Removing import PIL.ImageQt from module PySide.qRgba 
46528 INFO: Excluding import 'tkinter' 
46532 INFO: Import to be excluded not found: 'FixTk' 
46532 INFO: Excluding import 'PyQt4' 
46539 WARNING: Removing import PIL.ImageQt from module PyQt4.QtCore 
46539 WARNING: Removing import PIL.ImageQt from module PyQt4.QtCore.QBuffer 
46539 WARNING: Removing import PIL.ImageQt from module PyQt4.QtGui.qRgba 
46539 WARNING: Removing import PIL.ImageQt from module PyQt4.QtCore.QIODevice 
46539 WARNING: Removing import PIL.ImageQt from module PyQt4.QtGui.QImage 
46541 WARNING: Removing import PIL.ImageQt from module PyQt4.QtGui.QPixmap 
46542 WARNING: Removing import PIL.ImageQt from module PyQt4.QtGui 
46544 INFO: Loading module hook "hook-PyQt4.QtCore.py"... 
46643 INFO: Loading module hook "hook-zmq.py"... 
47427 INFO: Excluding import 'zmq.libzmq' 
47432 WARNING: Removing import zmq from module zmq.libzmq 
47433 INFO: Loading module hook "hook-PyQt4.QtSvg.py"... 
47435 INFO: Loading module hook "hook-xml.etree.cElementTree.py"... 
47436 INFO: Loading module hook "hook-distutils.py"... 
47437 INFO: Loading module hook "hook-xml.py"... 
47439 INFO: Loading module hook "hook-pkg_resources.py"... 
47440 INFO: Loading module hook "hook-sysconfig.py"... 
47442 INFO: Loading module hook "hook-PyQt4.py"... 
47443 INFO: Loading module hook "hook-PIL.Image.py"... 
47621 INFO: Loading module hook "hook-cryptography.py"... 
47627 INFO: Loading module hook "hook-pywintypes.py"... 
48177 INFO: Loading module hook "hook-shelve.py"... 
48187 INFO: Loading module hook "hook-gevent.monkey.py"... 
48192 INFO: Loading module hook "hook-PIL.SpiderImagePlugin.py"... 
48198 INFO: Excluding import 'tkinter' 
48202 INFO: Import to be excluded not found: 'FixTk' 
48350 INFO: checking Tree 
48351 INFO: Building Tree because out02-Tree.toc is non existent 
48351 INFO: Building Tree out02-Tree.toc 
48581 INFO: checking Tree 
48582 INFO: Building Tree because out03-Tree.toc is non existent 
48582 INFO: Building Tree out03-Tree.toc 
48585 INFO: Looking for ctypes DLLs 
48657 INFO: Analyzing run-time hooks ... 
48677 INFO: Including run-time hook 'pyi_rth_pkgres.py' 
48680 INFO: Including run-time hook 'pyi_rth_traitlets.py' 
48682 INFO: Including run-time hook 'pyi_rth_win32comgenpy.py' 
48687 INFO: Including run-time hook 'pyi_rth__tkinter.py' 
48690 INFO: Including run-time hook 'pyi_rth_qt4plugins.py' 
48693 INFO: Including run-time hook 'pyi_rth_mplconfig.py' 
48695 INFO: Including run-time hook 'pyi_rth_mpldata.py' 
48742 INFO: Looking for dynamic libraries 
65958 WARNING: lib not found: libzmq.cp35-win_amd64.pyd dependency of C:\Users\310251823\AppData\Local\Continuum\Anaconda3\lib\site-packages\zmq\backend\cython\socket.cp35-win_amd64.p 
yd 
66065 WARNING: lib not found: libzmq.cp35-win_amd64.pyd dependency of C:\Users\310251823\AppData\Local\Continuum\Anaconda3\lib\site-packages\zmq\backend\cython\_device.cp35-win_amd64. 
pyd 
66161 WARNING: lib not found: libzmq.cp35-win_amd64.pyd dependency of C:\Users\310251823\AppData\Local\Continuum\Anaconda3\lib\site-packages\zmq\backend\cython\error.cp35-win_amd64.py 
d 
66361 WARNING: lib not found: libzmq.cp35-win_amd64.pyd dependency of C:\Users\310251823\AppData\Local\Continuum\Anaconda3\lib\site-packages\zmq\backend\cython\context.cp35-win_amd64. 
pyd 
66574 WARNING: lib not found: libzmq.cp35-win_amd64.pyd dependency of C:\Users\310251823\AppData\Local\Continuum\Anaconda3\lib\site-packages\zmq\backend\cython\_version.cp35-win_amd64 
.pyd 
66679 WARNING: lib not found: libzmq.cp35-win_amd64.pyd dependency of C:\Users\310251823\AppData\Local\Continuum\Anaconda3\lib\site-packages\zmq\backend\cython\utils.cp35-win_amd64.py 
d 
66797 WARNING: lib not found: libzmq.cp35-win_amd64.pyd dependency of C:\Users\310251823\AppData\Local\Continuum\Anaconda3\lib\site-packages\zmq\backend\cython\message.cp35-win_amd64. 
pyd 
66983 WARNING: lib not found: libzmq.cp35-win_amd64.pyd dependency of C:\Users\310251823\AppData\Local\Continuum\Anaconda3\lib\site-packages\zmq\backend\cython\_poll.cp35-win_amd64.py 
d 
75241 WARNING: Can not get binary dependencies for file: C:\Users\310251823\AppData\Local\Continuum\Anaconda3\api-ms-win-crt-utility-l1-1-0.dll 
Traceback (most recent call last): 
    File "C:\Users\310251823\AppData\Local\Continuum\Anaconda3\lib\site-packages\pyinstaller-3.2-py3.5.egg\PyInstaller\depend\bindepend.py", line 695, in getImports 
    return _getImports_pe(pth) 
    File "C:\Users\310251823\AppData\Local\Continuum\Anaconda3\lib\site-packages\pyinstaller-3.2-py3.5.egg\PyInstaller\depend\bindepend.py", line 122, in _getImports_pe 
    dll, _ = sym.forwarder.split('.') 
TypeError: a bytes-like object is required, not 'str' 
76302 WARNING: Can not get binary dependencies for file: C:\Users\310251823\AppData\Local\Continuum\Anaconda3\api-ms-win-crt-multibyte-l1-1-0.dll 
Traceback (most recent call last): 
    File "C:\Users\310251823\AppData\Local\Continuum\Anaconda3\lib\site-packages\pyinstaller-3.2-py3.5.egg\PyInstaller\depend\bindepend.py", line 695, in getImports 
    return _getImports_pe(pth) 
    File "C:\Users\310251823\AppData\Local\Continuum\Anaconda3\lib\site-packages\pyinstaller-3.2-py3.5.egg\PyInstaller\depend\bindepend.py", line 122, in _getImports_pe 
    dll, _ = sym.forwarder.split('.') 
TypeError: a bytes-like object is required, not 'str' 
86495 INFO: Found C:\windows\WinSxS\Manifests\amd64_policy.9.0.microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.4940_none_acd19a1fe1da248a.manifest 
86496 INFO: Found C:\windows\WinSxS\Manifests\amd64_policy.9.0.microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.6161_none_acd388d7e1d8689f.manifest 
86726 INFO: Searching for assembly amd64_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.30729.6161_none ... 
86726 INFO: Found manifest C:\windows\WinSxS\Manifests\amd64_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.6161_none_08e61857a83bc251.manifest 
86728 INFO: Searching for file msvcr90.dll 
86728 INFO: Found file C:\windows\WinSxS\amd64_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.6161_none_08e61857a83bc251\msvcr90.dll 
86728 INFO: Searching for file msvcp90.dll 
86729 INFO: Found file C:\windows\WinSxS\amd64_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.6161_none_08e61857a83bc251\msvcp90.dll 
86729 INFO: Searching for file msvcm90.dll 
86729 INFO: Found file C:\windows\WinSxS\amd64_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.6161_none_08e61857a83bc251\msvcm90.dll 
86947 INFO: Found C:\windows\WinSxS\Manifests\amd64_policy.9.0.microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.4940_none_acd19a1fe1da248a.manifest 
86948 INFO: Found C:\windows\WinSxS\Manifests\amd64_policy.9.0.microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.6161_none_acd388d7e1d8689f.manifest 
86949 INFO: Adding redirect Microsoft.VC90.CRT version (9, 0, 21022, 8) -> (9, 0, 30729, 6161) 
92515 WARNING: Attempted to add Python module twice with different upper/lowercases: PyQt4.QtCore 
92515 WARNING: Attempted to add Python module twice with different upper/lowercases: PyQt4.QtSvg 
92515 WARNING: Attempted to add Python module twice with different upper/lowercases: PyQt4.QtGui 
92516 WARNING: Attempted to add Python module twice with different upper/lowercases: PIL._imaging 
92516 WARNING: Attempted to add Python module twice with different upper/lowercases: PIL._imagingft 
92516 INFO: Looking for eggs 
92517 INFO: Using Python library C:\Users\310251823\AppData\Local\Continuum\Anaconda3\python35.dll 
92517 INFO: Found binding redirects: 
[BindingRedirect(name='Microsoft.VC90.CRT', language=None, arch='amd64', oldVersion=(9, 0, 21022, 8), newVersion=(9, 0, 30729, 6161), publicKeyToken='1fc8b3b9a1e18e3b')] 
92561 INFO: Warnings written to C:\Users\310251823\PycharmProjects\Prove1\build\Prova\warnProva.txt 
92722 INFO: checking PYZ 
92722 INFO: Building PYZ because out00-PYZ.toc is non existent 
92722 INFO: Building PYZ (ZlibArchive) C:\Users\310251823\PycharmProjects\Prove1\build\Prova\out00-PYZ.pyz 
96605 INFO: checking PKG 
96605 INFO: Building PKG because out00-PKG.toc is non existent 
96605 INFO: Building PKG (CArchive) out00-PKG.pkg 
96703 INFO: Bootloader C:\Users\310251823\AppData\Local\Continuum\Anaconda3\lib\site-packages\pyinstaller-3.2-py3.5.egg\PyInstaller\bootloader\Windows-64bit\run.exe 
96703 INFO: checking EXE 
96703 INFO: Building EXE because out00-EXE.toc is non existent 
96703 INFO: Building EXE from out00-EXE.toc 
96703 INFO: Appending archive to EXE C:\Users\310251823\PycharmProjects\Prove1\build\Prova\Prova.exe 
96733 INFO: checking COLLECT 
96733 INFO: Building COLLECT because out00-COLLECT.toc is non existent 
96733 INFO: Building COLLECT out00-COLLECT.toc 

Here私が持っているもののようなものだが、私は解決策を理解していません。 .specファイルにパッケージングパッケージをインポートするにはどうしたらいいですか?

は、excludes the tkinter module required by matplotlib私はPILフックがロードされていることをpyInstallerのログに表示すべての のSm

答えて

0

最初に、ありがとう。これは一般的な問題です。私も持っていましたが、エラーメッセージが常にその方向を指しているとは限りません。

解決するために、私は2つのことをしました。

  1. import Tkinterimport FileDialogを自分のコードに使用してください。好ましくは、輸入後PIL
  2. Download and install the latest development version of pyinstaller。 3.2はまだ私に問題を与えていた。

packagingエラーが解決しない場合は、hidden-importとして追加できます。 .specファイルでは、これはAnalysisのオプションです。

+0

あなたのリプレイとヒントをありがとう。月曜日に私はあなたに知らせることを試みます。 – Smartis

+0

よろしくお願いします。 pyinstallerを開発者用のバージョンに更新しました。私は輸入の有無にかかわらず試してみました。私は.specファイルを編集しませんでした。 Sholud私はそれをインポートの有無にかかわらず実行しますか?今私はもっと複雑なプログラムでテストしており、正しく動作しています。 ありがとうございました Sm – Smartis

+0

うまくいきました。インポートが動作する場合は使用しないでください。以前のpyinstallerのバージョンで問題を解決するためにそれらを使用しました。最新の開発版では、それらを必要としない可能性があります。 – Repiklis

0

アナウサの場合、setuptoolsの一部、pkg_resources._vendor.packagingがありません。それが言うように、配布のパッケージャに連絡する必要があるかもしれません。 pyInstallerのの

開発バージョンはversionがanaconda3、それさえもコピーする必要がdllファイルの依存関係で動作するように思われること

pip install https://github.com/pyinstaller/pyinstaller/archive/develop.zip 

でインストールすることができます。しかし、tkinter.filedialogを非表示のインポートとして指定する必要があります。

しかしアナコンダで問題が発生した場合、私は知らない

python -m pip install --upgrade --force-reinstall setuptools 

でsetuptoolsののより標準的なバージョンをインストールすることが可能です。

私は隠されたインポートとしてtkinter.filedialogを追加し、setuptoolsの別のバージョンをインストールした後、あなたのスクリプトの実行可能ファイルを構築することができた、とコピー MKL _ *。dllをAnaconda3 /ライブラリ/ binにフォルダからファイル。

関連する問題