pyinstaller / pyinstaller-hooks-contrib

Community maintained hooks for PyInstaller.
Other
94 stars 125 forks source link

Need hook for "preshed" #38

Closed ctrado18 closed 3 years ago

ctrado18 commented 7 years ago

Hey,

I hope you can guide me working my exe. :-) I am new to so I need support what I have to done corresponding top the many missing modules!

Pyinstaller 3.3.dev0+d118e6e00 python 2.7.13 Using Anaconda 4.3.23 Windows-7-6.1 SP1 UPX is not avialble

My spec:


# -*- mode: python -*-

block_cipher = None

import os

a = Analysis(['main.py'],
             pathex=['C:\\Users\\Name\\Desktop\\Main\\03_app'],
             binaries=[],
             datas=[],
             hiddenimports=[],
             hookspath=[],
             runtime_hooks=[],
             excludes=[],
             win_no_prefer_redirects=False,
             win_private_assemblies=False,
             cipher=block_cipher)
pyz = PYZ(a.pure, a.zipped_data,
             cipher=block_cipher)
exe = EXE(pyz,
          a.scripts,
          exclude_binaries=True,
          name='main',
          debug=False,
          strip=False,
          upx=True,
          console=True )
coll = COLLECT(exe,
               a.binaries,
               a.zipfiles,
               a.datas,
               strip=False,
               upx=True,
               name='main')

Alos follwoing Warning comes out of console:

Internal error: early pywin32 import was introduced

Also I copy the warning message file with the missing modules. I cannot understand why tehre are so many. So I should add all these modules in the hidden import option?

missing module named 'org.python' - imported by copy, setuptools.sandbox, xml.sax
missing module named console - imported by pyreadline.console.ansi
missing module named startup - imported by pyreadline.keysyms.common, pyreadline.keysyms.keysyms
missing module named System - imported by pyreadline.clipboard.ironpython_clipboard, pyreadline.keysyms.ironpython_keysyms, pyreadline.console.ironpython_console, pyreadline.rlmain, traitlets.traitlets, IPython.utils._process_cli
missing module named _scproxy - imported by urllib, future.backports.urllib.request
missing module named EasyDialogs - imported by getpass
missing module named termios - imported by getpass, tty, backports.shutil_get_terminal_size.get_terminal_size, IPython.utils._get_terminal_size, prompt_toolkit.terminal.vt100_output, prompt_toolkit.terminal.vt100_input, IPython.core.page, pandas.io.formats.terminal, pip.utils, tqdm._utils
missing module named pwd - imported by posixpath, getpass, shutil, tarfile, pathlib, webbrowser, distutils.util, distutils.archive_util, pathlib2, netrc, pip._vendor.distlib._backport.tarfile, pip._vendor.distlib._backport.shutil
missing module named SOCKS - imported by ftplib
missing module named rourl2path - imported by urllib
missing module named IronPythonConsole - imported by pyreadline.console.ironpython_console
missing module named clr - imported by pyreadline.clipboard.ironpython_clipboard, pyreadline.console.ironpython_console, IPython.utils._process_cli
missing module named unittest.mock - imported by unittest, matplotlib, pandas.util.testing
missing module named org - imported by pickle
missing module named fcntl - imported by tempfile, subprocess, backports.shutil_get_terminal_size.get_terminal_size, IPython.utils._get_terminal_size, prompt_toolkit.terminal.vt100_output, prompt_toolkit.eventloop.posix, pandas.io.formats.terminal, pip.utils, tqdm._utils
missing module named riscosenviron - imported by os
missing module named riscospath - imported by os
missing module named riscos - imported by os
missing module named ce - imported by os
missing module named _emx_link - imported by os
missing module named os2 - imported by os
missing module named posix - imported by os
missing module named resource - imported by posix, profile, IPython.utils.timing
missing module named _sysconfigdata - imported by distutils.sysconfig, sysconfig
missing module named grp - imported by shutil, tarfile, pathlib, distutils.archive_util, pathlib2, pip._vendor.distlib._backport.tarfile, pip._vendor.distlib._backport.shutil
missing module named importlib.reload - imported by importlib, IPython.core.extensions
missing module named 'dbm.ndbm' - imported by future.moves.dbm.ndbm
missing module named gdbm - imported by anydbm, future.moves.dbm.gnu
missing module named 'dbm.gnu' - imported by future.moves.dbm.gnu
missing module named 'dbm.dumb' - imported by future.moves.dbm.dumb
missing module named bsddb3 - imported by bsddb
missing module named _pybsddb - imported by bsddb, bsddb.db
missing module named dbm - imported by future.standard_library, future.moves.dbm, whichdb, anydbm, future.moves.dbm.ndbm
missing module named 'test.test_support' - imported by future.moves.test.support
missing module named 'test.support' - imported by future.moves.test.support
missing module named winreg.OpenKeyEx - imported by winreg, platform
missing module named winreg.HKEY_LOCAL_MACHINE - imported by winreg, platform
missing module named winreg.QueryValueEx - imported by winreg, platform
missing module named winreg.CloseKey - imported by winreg, platform
missing module named configparser - imported by setuptools.py36compat, numpy.distutils.system_info, numpy.distutils.npy_pkg_config, pip._vendor.distlib.compat, pip._vendor.distlib._backport.sysconfig
missing module named 'java.lang' - imported by platform, xml.sax._exceptions
missing module named _xmlplus - imported by xml
missing module named _xmlrpclib - imported by xmlrpclib
missing module named _dummy_threading - imported by dummy_threading
missing module named pkg_resources.extern.packaging - imported by pkg_resources.extern, pkg_resources, setuptools.dist, setuptools.command.egg_info
missing module named pkg_resources.extern.appdirs - imported by pkg_resources.extern, pkg_resources
missing module named pkg_resources.extern.six - imported by pkg_resources.extern, pkg_resources
missing module named 'setuptools.extern.six.moves' - imported by setuptools.dist, setuptools.command.easy_install, setuptools.sandbox, setuptools.command.setopt, setuptools.package_index, setuptools.ssl_support, setuptools.command.egg_info, setuptools.command.py36compat, setuptools.namespaces, setuptools.msvc
missing module named 'urllib.parse' - imported by uritemplate.variable, asn1crypto._iri, pathlib, setuptools.py26compat, setuptools.package_index, numpy.lib._datasource, pathlib2, requests.compat, IPython.lib.display, IPython.core.extensions, pandas.io.common, botocore.vendored.requests.packages.urllib3.request, botocore.vendored.requests.packages.urllib3.poolmanager, botocore.vendored.requests.compat, pandas.io.s3, jinja2._compat, pip._vendor.requests.packages.urllib3.request, pip._vendor.requests.packages.urllib3.poolmanager, pip._vendor.requests.compat, pip._vendor.cachecontrol.compat, pip._vendor.distlib.compat, sklearn.externals.joblib.func_inspect, botocore.compat
missing module named 'setuptools.extern.six' - imported by setuptools, setuptools.extension
missing module named 'pkg_resources.extern.packaging.version' - imported by setuptools.msvc
missing module named 'backports.ssl_match_hostname' - imported by setuptools.ssl_support, urllib3.packages.ssl_match_hostname, botocore.vendored.requests.packages.urllib3.packages.ssl_match_hostname, pip._vendor.requests.packages.urllib3.packages.ssl_match_hostname
missing module named 'pkg_resources.extern.pyparsing' - imported by pkg_resources._vendor.packaging.requirements, pkg_resources._vendor.packaging.markers
missing module named ordereddict - imported by pyparsing, html5lib.html5parser, html5lib.treewalkers.etree, html5lib.filters.alphabeticalattributes, pip._vendor.html5lib.treewalkers.etree, pip._vendor.html5lib.filters.alphabeticalattributes, tqdm._utils, botocore.compat, pkg_resources._vendor.pyparsing
missing module named _thread.RLock - imported by _thread, pyparsing, pip._vendor.pyparsing, pkg_resources._vendor.pyparsing
missing module named 'com.sun' - imported by pip._vendor.appdirs, pkg_resources._vendor.appdirs
missing module named 'win32com.gen_py' - imported by win32com, C:\Users\Namec\AppData\Local\Continuum\Anaconda3\envs\py27_cx_freeze\lib\site-packages\PyInstaller\loader\rthooks\pyi_rth_win32comgenpy.py
missing module named 'importlib.machinery' - imported by numpy.compat.py3k, cffi.verifier, pkg_resources, IPython.core.completerlib, pip._vendor.pkg_resources
missing module named 'pkg_resources.extern.six.moves' - imported by pkg_resources, pkg_resources._vendor.packaging.requirements
missing module named _imp - imported by pkg_resources, pip._vendor.pkg_resources
missing module named 'Carbon.File' - imported by plistlib
missing module named 'Carbon.Files' - imported by plistlib
missing module named Carbon - imported by plistlib
missing module named setuptools.extern.six - imported by setuptools.extern, setuptools.monkey, setuptools.dist, setuptools.py33compat, setuptools.config, setuptools.command.easy_install, setuptools.sandbox, setuptools.py27compat, setuptools.package_index, setuptools.command.egg_info, setuptools.command.sdist, setuptools.command.bdist_egg, setuptools.unicode_utils, setuptools.glob, setuptools.command.develop
missing module named 'numpy_distutils.cpuinfo' - imported by numpy.f2py.diagnose
missing module named 'numpy_distutils.fcompiler' - imported by numpy.f2py.diagnose
missing module named 'numpy_distutils.command' - imported by numpy.f2py.diagnose
missing module named numpy_distutils - imported by numpy.f2py.diagnose
missing module named __svn_version__ - imported by numpy.f2py.__version__
missing module named numarray - imported by numpy.distutils.system_info
missing module named Numeric - imported by numpy.distutils.system_info
missing module named _curses - imported by curses, curses.has_key
missing module named 'nose.plugins' - imported by numpy.testing.noseclasses, numpy.testing.nosetester, IPython.testing.iptest, IPython.testing.plugin.ipdoctest, IPython.external.decorators._numpy_testing_noseclasses, matplotlib.testing.noseclasses, matplotlib
missing module named scipy.exp - imported by scipy, scipy.signal.wavelets
missing module named scipy.linspace - imported by scipy, scipy.signal.wavelets
missing module named scipy.pi - imported by scipy, scipy.signal.wavelets
missing module named numpy.lib.i0 - imported by numpy.lib, numpy.dual
missing module named numpy.eye - imported by numpy, numpy.core.numeric, scipy.interpolate._pade, scipy.optimize.optimize, scipy.optimize.minpack, scipy.signal.lti_conversion
missing module named numpy.core.intp - imported by numpy.core, numpy.linalg.linalg
missing module named numpy.core.geterrobj - imported by numpy.core, numpy.linalg.linalg
missing module named numpy.core.maximum - imported by numpy.core, numpy.linalg.linalg
missing module named numpy.core.double - imported by numpy.core, numpy.linalg.linalg
missing module named numpy.core.complexfloating - imported by numpy.core, numpy.linalg.linalg
missing module named numpy.core.multiply - imported by numpy.core, numpy.linalg.linalg
missing module named numpy.core.inexact - imported by numpy.core, numpy.linalg.linalg
missing module named numpy.core.add - imported by numpy.core, numpy.linalg.linalg
missing module named numpy.core.object_ - imported by numpy.core, numpy.linalg.linalg
missing module named numpy.core.cdouble - imported by numpy.core, numpy.linalg.linalg
missing module named numpy.core.single - imported by numpy.core, numpy.linalg.linalg
missing module named numpy.core.longdouble - imported by numpy.core, numpy.linalg.linalg
missing module named numpy.core.csingle - imported by numpy.core, numpy.linalg.linalg
missing module named numpy.core.integer - imported by numpy.core, numpy.fft.helper
missing module named numpy.core.conjugate - imported by numpy.core, numpy.fft.fftpack
missing module named numpy.core.sqrt - imported by numpy.core, numpy.fft.fftpack, numpy.linalg.linalg, scipy.sparse.linalg._norm
missing module named numpy.core.number - imported by numpy.core, numpy.testing.utils
missing module named numpy.core.signbit - imported by numpy.core, numpy.testing.utils
missing module named numpy.core.float64 - imported by numpy.core, numpy.testing.utils
missing module named numpy.core.isinf - imported by numpy.core, numpy.testing.utils
missing module named numpy.core.isfinite - imported by numpy.core, numpy.testing.utils, numpy.linalg.linalg
missing module named numpy.core.isnan - imported by numpy.core, numpy.testing.utils
missing module named numpy.core.float32 - imported by numpy.core, numpy.testing.utils
missing module named numpy.ndarray - imported by numpy, numpy.ma.core, numpy.ma.extras, numpy.ma.mrecords, numpy.ctypeslib, IPython.core.magics.namespace, pandas.core.series, pandas.compat.numpy.function, scipy.stats._distn_infrastructure, scipy.stats.mstats_basic, scipy.stats.mstats_extras, scipy.signal.signaltools
missing module named numpy.recarray - imported by numpy, numpy.ma.mrecords
missing module named numpy.array - imported by numpy, numpy.ma.core, numpy.ma.extras, numpy.ma.mrecords, numpy.ctypeslib, scipy.stats.stats, scipy.linalg.decomp, scipy.sparse.linalg.isolve.utils, scipy.misc.common, scipy.interpolate.interpolate, scipy.interpolate._fitpack_impl, scipy.interpolate.fitpack2, scipy.misc.pilutil, scipy.optimize.lbfgsb, scipy.optimize.tnc, scipy.optimize.slsqp, scipy.optimize.minpack, scipy.integrate._ode, scipy.stats.morestats, scipy.signal.bsplines, scipy.signal.filter_design, scipy.signal.signaltools, scipy.signal.lti_conversion
missing module named numpy.bool_ - imported by numpy, numpy.ma.core, numpy.ma.mrecords
missing module named numpy.dtype - imported by numpy, numpy.ma.mrecords, numpy.ctypeslib, scipy.optimize.minpack
missing module named 'urllib.error' - imported by numpy.lib._datasource, pandas.io.common, pip._vendor.distlib.compat
missing module named 'urllib.request' - imported by numpy.lib._datasource, requests.compat, IPython.lib.display, IPython.utils.openpy, IPython.core.display, IPython.core.extensions, IPython.core.magics.code, IPython.core.interactiveshell, pandas.io.common, botocore.vendored.requests.compat, pip._vendor.requests.compat, pip._vendor.distlib.compat, pygments.lexers._php_builtins, pygments.lexers._postgres_builtins, pygments.lexers._lua_builtins, pygments.lexers._sourcemod_builtins
missing module named numpy.histogramdd - imported by numpy, numpy.lib.twodim_base
missing module named numpy.lib.triu - imported by numpy.lib, numpy.linalg.linalg
missing module named numpy.lib.iscomplexobj - imported by numpy.lib, numpy.testing.utils
missing module named numpy.lib.imag - imported by numpy.lib, numpy.testing.utils
missing module named numpy.lib.real - imported by numpy.lib, numpy.testing.utils
missing module named numpy.sinh - imported by numpy, scipy.stats._discrete_distns, scipy.signal.filter_design, scipy.fftpack.pseudo_diffs
missing module named numpy.cosh - imported by numpy, scipy.stats._discrete_distns, scipy.signal.filter_design, scipy.fftpack.pseudo_diffs
missing module named numpy.iscomplexobj - imported by numpy, numpy.ma.core, scipy.linalg.decomp, scipy.misc.pilutil, scipy.fftpack.pseudo_diffs, scipy.signal.signaltools
missing module named numpy.tanh - imported by numpy, scipy.stats._discrete_distns, scipy.fftpack.pseudo_diffs
missing module named scipy.spatial.cKDTree - imported by scipy.spatial, scipy.interpolate.ndgriddata
missing module named 'PySide.QtCore' - imported by PIL.ImageQt
missing module named 'PyQt4.QtCore' - imported by PIL.ImageQt
missing module named 'PyQt4.QtGui' - imported by pandas.io.clipboard.clipboards, PIL.ImageQt
missing module named testing - imported by cffi.recompiler
missing module named _thread.allocate_lock - imported by _thread, cffi.lock
missing module named cffi._pycparser - imported by cffi, cffi.cparser
missing module named PIL._imagingagg - imported by PIL, PIL.ImageDraw
missing module named "'six.moves.urllib'.parse" - imported by googleapiclient.discovery, googleapiclient.http, googleapiclient.model, matplotlib.image, matplotlib.textpath
missing module named 'tornado.template' - imported by matplotlib.backends.backend_webagg
missing module named 'tornado.websocket' - imported by matplotlib.backends.backend_webagg
missing module named 'tornado.ioloop' - imported by matplotlib.backends.backend_webagg
missing module named 'tornado.web' - imported by matplotlib.backends.backend_webagg
missing module named tornado - imported by matplotlib.backends.backend_webagg, matplotlib.backends.backend_webagg_core, cloudpickle.cloudpickle
missing module named matplotlib.axes.Axes - imported by matplotlib.axes, matplotlib.legend, matplotlib.projections.geo, matplotlib.projections.polar, matplotlib.pyplot, matplotlib.figure
missing module named 'collections.abc' - imported by matplotlib.rcsetup, typing
missing module named matplotlib.tri.Triangulation - imported by matplotlib.tri, matplotlib.tri.trifinder, matplotlib.tri.tritools, matplotlib.tri.triinterpolate, matplotlib.mlab
missing module named six.moves.reduce - imported by six.moves, cycler, matplotlib.axes._axes
missing module named six.moves.map - imported by six.moves, prompt_toolkit.document, matplotlib.patches, matplotlib.afm, matplotlib.mlab, matplotlib.axes._subplots
missing module named PySide - imported by matplotlib.backends.qt_compat
missing module named PyQt4 - imported by matplotlib.pyplot, pandas.io.clipboard, matplotlib.backends.qt_compat
missing module named PyQt5.QtX11Extras - imported by PyQt5, matplotlib.backends.backend_qt5
missing module named numpy.isinf - imported by numpy, matplotlib.mathtext, scipy.optimize.optimize, scipy.stats._distn_infrastructure
missing module named scipy.special.gammainc - imported by scipy.special, sklearn.neighbors.kde
missing module named scipy.special.expit - imported by scipy.special, sklearn.gaussian_process.gpc, sklearn.linear_model.logistic
missing module named scipy.special.erf - imported by scipy.special, sklearn.gaussian_process.gpc
missing module named scipy.special.betaln - imported by scipy.special, scipy.stats._discrete_distns
missing module named scipy.special.beta - imported by scipy.special, scipy.stats._tukeylambda_stats
missing module named scipy.special.rel_entr - imported by scipy.special, scipy.stats._distn_infrastructure
missing module named scipy.special.kl_div - imported by scipy.special, scipy.stats._distn_infrastructure
missing module named scipy.special.entr - imported by scipy.special, scipy.stats._distn_infrastructure, scipy.stats._discrete_distns, scipy.stats._multivariate
missing module named scipy.special.chndtr - imported by scipy.special, scipy.stats._distn_infrastructure
missing module named scipy.special.ive - imported by scipy.special, scipy.stats._distn_infrastructure
missing module named scipy.special.xlogy - imported by scipy.special, scipy.interpolate.rbf, scipy.stats._distn_infrastructure, scipy.stats._multivariate
missing module named numpy.inexact - imported by numpy, scipy.special.basic, scipy.linalg.decomp, scipy.optimize.minpack
missing module named numpy.less - imported by numpy, scipy.special.basic
missing module named numpy.arccos - imported by numpy, scipy.special.orthogonal
missing module named scipy.special.airy - imported by scipy.special, scipy.special.orthogonal
missing module named scipy.special.comb - imported by scipy.special, scipy.linalg.special_matrices, scipy.interpolate.interpolate, scipy.misc, scipy.stats._distn_infrastructure, scipy.signal.bsplines, scipy.signal.filter_design, scipy.signal.wavelets, sklearn.utils.fixes
missing module named numpy.conj - imported by numpy, scipy.linalg.decomp
missing module named numpy.isfinite - imported by numpy, scipy.linalg.decomp, scipy.linalg.matfuncs, scipy.optimize.slsqp
missing module named scipy.linalg._cblas - imported by scipy.linalg, scipy.linalg.blas
missing module named scipy.linalg._clapack - imported by scipy.linalg, scipy.linalg.lapack
missing module named scikits - imported by scipy.sparse.linalg.dsolve.linsolve
missing module named scipy.linalg.qr_insert - imported by scipy.linalg, scipy.sparse.linalg.isolve.lgmres
missing module named scipy.sparse.coo_matrix - imported by scipy.sparse, scipy.sparse.data, scipy.optimize._numdiff, scipy.integrate._bvp, pandas.core.sparse.frame, sklearn.utils.fixes, sklearn.metrics.classification
missing module named numpy.double - imported by numpy, scipy.optimize.nnls
missing module named numpy.float64 - imported by numpy, scipy.optimize.lbfgsb
missing module named numpy.sign - imported by numpy, scipy.linalg.matfuncs, scipy.optimize.zeros
missing module named numpy.greater - imported by numpy, scipy.optimize.minpack
missing module named numpy.conjugate - imported by numpy, scipy.linalg.matfuncs, scipy.signal.filter_design
missing module named numpy.single - imported by numpy, scipy.linalg.decomp_schur, scipy.linalg.matfuncs
missing module named numpy.amax - imported by numpy, numpy.ma.core, scipy.linalg.matfuncs, scipy.misc.pilutil, scipy.stats.morestats
missing module named numpy.logical_not - imported by numpy, scipy.linalg.matfuncs
missing module named scipy.arange - imported by scipy, scipy.sparse.linalg.isolve.minres
missing module named scipy.ones - imported by scipy, scipy.sparse.linalg.isolve.minres
missing module named numpy.random.randn - imported by numpy.random, scipy, pandas.util.testing
missing module named numpy.random.rand - imported by numpy.random, scipy, pandas.util.testing
missing module named nose - imported by numpy.testing.utils, numpy.testing.decorators, numpy.testing.noseclasses, IPython.testing.iptest, IPython.external.decorators._decorators, IPython.testing.decorators, matplotlib, pandas.util.testing
missing module named 'nose.util' - imported by numpy.testing.noseclasses, IPython.testing.iptest, IPython.testing.plugin.ipdoctest
missing module named numpy.linalg.inv - imported by numpy.linalg, numpy.matrixlib.defmatrix, numpy.lib.polynomial, matplotlib.transforms, scipy.linalg._solvers
missing module named numpy.random.randint - imported by numpy.random, scipy.stats.kde
missing module named numpy.random.multivariate_normal - imported by numpy.random, scipy.stats.kde
missing module named mklfft - imported by numpy.fft
missing module named 'mpl_toolkits.natgrid' - imported by matplotlib.mlab
missing module named six.moves.range - imported by six.moves, googleapiclient.http, dateutil.rrule, prompt_toolkit.utils, prompt_toolkit.document, prompt_toolkit.buffer, prompt_toolkit.layout.containers, prompt_toolkit.layout.controls, prompt_toolkit.layout.lexers, prompt_toolkit.layout.processors, prompt_toolkit.layout.margins, prompt_toolkit.styles.from_dict, prompt_toolkit.renderer, prompt_toolkit.key_binding.bindings.named_commands, prompt_toolkit.key_binding.bindings.scroll, prompt_toolkit.key_binding.bindings.vi, prompt_toolkit.layout.menus, prompt_toolkit.terminal.vt100_output, prompt_toolkit.terminal.win32_input, prompt_toolkit.key_binding.input_processor, prompt_toolkit.terminal.vt100_input
missing module named dateutil.tz.tzfile - imported by dateutil.tz, dateutil.zoneinfo
missing module named "'six.moves.urllib'.request" - imported by matplotlib.finance, matplotlib.image, matplotlib
missing module named subprocess32 - imported by matplotlib.compat.subprocess
missing module named numpy.expand_dims - imported by numpy, numpy.ma.core, scipy.signal.signaltools
missing module named numpy.amin - imported by numpy, numpy.ma.core, scipy.misc.pilutil, scipy.stats.morestats
missing module named pexpect - imported by IPython.utils._process_posix
missing module named 'ipykernel.pylab' - imported by IPython.core.pylabtools, IPython.core.display
missing module named ipykernel - imported by IPython.core.pylabtools, IPython.kernel
missing module named nbformat - imported by IPython.core.magics.basic, IPython.core.interactiveshell
missing module named docrepr - imported by IPython.core.interactiveshell
missing module named nbconvert - imported by IPython.utils.io
missing module named notebook - imported by IPython.utils.io, IPython.html
missing module named pysqlite2 - imported by IPython.core.history
missing module named pygments.lexers.PythonLexer - imported by pygments.lexers, IPython.core.oinspect
missing module named pygments.formatters.HtmlFormatter - imported by pygments.formatters, IPython.core.oinspect
missing module named ctags - imported by pygments.formatters.html
missing module named asyncio - imported by prompt_toolkit.eventloop.asyncio_win32, prompt_toolkit.eventloop.asyncio_posix
missing module named selectors - imported by prompt_toolkit.eventloop.select
missing module named backports.lzma - imported by backports, pandas.compat
missing module named traitlets.config.Application - imported by traitlets.config, traitlets.log
missing module named 'coverage.html' - imported by IPython.testing.iptestcontroller
missing module named coverage - imported by IPython.testing.iptestcontroller
missing module named testpath - imported by IPython.testing.plugin.ipdoctest
missing module named 'nose.core' - imported by IPython.testing.iptest
missing module named simplejson - imported by requests.compat, botocore.vendored.requests.compat, pandas.util._print_versions, botocore.compat
missing module named "'urllib3.packages.six.moves.urllib'.parse" - imported by urllib3.request, urllib3.poolmanager
runtime module named urllib3.packages.six.moves - imported by httplib, urllib3.connectionpool, urllib3.util.response, 'urllib3.packages.six.moves.urllib', urllib3.response
missing module named 'six.moves.urllib_parse' - imported by 'six.moves.urllib_parse'
missing module named 'nose.tools' - imported by IPython.testing.tools, IPython.testing.decorators
missing module named 'unittest.mock' - imported by IPython.testing.tools
missing module named 'importlib.util' - imported by IPython.utils.openpy, pip.compat
missing module named 'IPython.kernel.zmq' - imported by IPython
missing module named 'ipykernel.embed' - imported by IPython
missing module named mock - imported by IPython.testing.tools, matplotlib, pandas.util.testing
missing module named faulthandler - imported by matplotlib
missing module named six.moves.reload_module - imported by six.moves, matplotlib
missing module named numpy.arccosh - imported by numpy, scipy.signal.filter_design
missing module named numpy.arctan - imported by numpy, scipy.signal.filter_design
missing module named numpy.arcsinh - imported by numpy, scipy.signal.filter_design
missing module named numpy.tan - imported by numpy, scipy.signal.bsplines, scipy.signal.filter_design
missing module named numpy.power - imported by numpy, scipy.stats.kde
missing module named numpy.hypot - imported by numpy, scipy.stats.morestats
missing module named numpy.log1p - imported by numpy, scipy.stats._discrete_distns
missing module named numpy.expm1 - imported by numpy, scipy.stats._discrete_distns
missing module named numpy.NINF - imported by numpy, scipy.stats._distn_infrastructure
missing module named numpy.logical_and - imported by numpy, scipy.stats._distn_infrastructure, scipy.signal.bsplines
missing module named numpy.log - imported by numpy, scipy.stats._distn_infrastructure, scipy.stats._discrete_distns, scipy.stats.morestats, scipy.signal.waveforms
missing module named six.moves.zip - imported by six.moves, googleapiclient.discovery, matplotlib.cbook, matplotlib.finance, matplotlib.colors, matplotlib.dates, matplotlib.collections, matplotlib.patches, matplotlib.text, matplotlib.widgets, matplotlib.mlab, cycler, matplotlib.colorbar, matplotlib.gridspec, matplotlib.axes._axes, matplotlib.offsetbox, matplotlib.legend_handler, matplotlib.textpath, sklearn_crfsuite.estimator
missing module named six.moves.xrange - imported by six.moves, matplotlib.cbook, matplotlib.finance, matplotlib.hatch, matplotlib.markers, matplotlib.backend_bases, matplotlib.mlab, matplotlib.contour, matplotlib.colorbar, matplotlib.axes._axes, matplotlib.legend, matplotlib.offsetbox, matplotlib.stackplot, matplotlib.streamplot, matplotlib.table, matplotlib.axes._base, matplotlib.dviread, matplotlib.backends.backend_svg, matplotlib.tri.triinterpolate
runtime module named six.moves - imported by googleapiclient.discovery, 'six.moves.urllib', oauth2client.client, oauth2client._helpers, oauth2client.transport, cryptography.hazmat.backends.openssl.decode_asn1, cryptography.x509.general_name, oauth2client.contrib.gce, oauth2client.contrib._metadata, googleapiclient.http, dateutil.tz.win, dateutil.rrule, prompt_toolkit.utils, prompt_toolkit.document, prompt_toolkit.buffer, prompt_toolkit.layout.containers, prompt_toolkit.layout.controls, prompt_toolkit.layout.lexers, prompt_toolkit.layout.processors, prompt_toolkit.layout.margins, prompt_toolkit.styles.from_dict, prompt_toolkit.renderer, prompt_toolkit.key_binding.bindings.named_commands, prompt_toolkit.key_binding.bindings.scroll, prompt_toolkit.key_binding.bindings.vi, prompt_toolkit.layout.menus, prompt_toolkit.terminal.vt100_output, prompt_toolkit.terminal.win32_input, prompt_toolkit.key_binding.input_processor, prompt_toolkit.terminal.vt100_input, matplotlib.cbook, matplotlib.finance, matplotlib.colors, matplotlib.dates, matplotlib.hatch, matplotlib.collections, matplotlib.patches, matplotlib.markers, matplotlib.text, matplotlib.font_manager, matplotlib.afm, matplotlib.backend_bases, matplotlib.widgets, matplotlib.mlab, matplotlib.contour, cycler, matplotlib.colorbar, matplotlib.gridspec, matplotlib.axes._subplots, matplotlib.axes._axes, matplotlib.legend, matplotlib.offsetbox, matplotlib.legend_handler, matplotlib.stackplot, matplotlib.streamplot, matplotlib.table, matplotlib.axes._base, matplotlib.dviread, matplotlib.backends.backend_svg, matplotlib.tri.triinterpolate, matplotlib.textpath, matplotlib, html5lib._inputstream, html5lib.filters.sanitizer, sklearn_crfsuite.estimator, matplotlib.backends.backend_tkagg, matplotlib.backends.tkagg, matplotlib.backends.backend_ps
missing module named gobject - imported by matplotlib.pyplot
missing module named gi - imported by matplotlib.pyplot
missing module named wx - imported by matplotlib.pyplot
missing module named lzma - imported by pandas.compat, pip.utils, sklearn.externals.joblib.numpy_pickle_utils
missing module named ImageFilter - imported by scipy.misc.pilutil
missing module named Image - imported by scipy.misc.pilutil
missing module named bottleneck - imported by pandas.core.nanops, pandas.util.testing
missing module named numexpr - imported by pandas.core.computation, pandas.core.computation.expressions, pandas.core.computation.engines
missing module named feather - imported by pandas.io.feather_format
missing module named xlsxwriter - imported by pandas.io.excel, pandas.core.config_init
missing module named xlwt - imported by pandas.io.excel
missing module named 'openpyxl.styles' - imported by pandas.io.excel
missing module named 'openpyxl.style' - imported by pandas.io.excel
missing module named 'openpyxl.cell' - imported by pandas.io.excel
missing module named 'openpyxl.workbook' - imported by pandas.io.excel
missing module named xlrd - imported by pandas.io.excel
missing module named openpyxl - imported by pandas.compat.openpyxl_compat, pandas.io.excel
missing module named pandas_gbq - imported by pandas.io.gbq
invalid module named jinja2.asyncsupport - imported by jinja2
missing module named pretty - imported by jinja2.utils
missing module named 'jinja2.debugrenderer' - imported by jinja2.debug
missing module named __pypy__ - imported by jinja2.debug
missing module named scipy.signal.dlti - imported by scipy.signal, scipy.signal.signaltools
missing module named xarray - imported by pandas.core.generic, pandas.util.testing
missing module named gtk - imported by pandas.io.clipboard.clipboards, pandas.io.clipboard
missing module named 'sqlalchemy.types' - imported by pandas.io.sql
missing module named 'sqlalchemy.schema' - imported by pandas.io.sql
missing module named 'sqlalchemy.ext' - imported by pandas.io.sql
missing module named sqlalchemy - imported by pandas.io.sql
missing module named blosc - imported by pandas.io.packers
missing module named tables - imported by pandas.io.pytables
missing module named 'ndg.httpsclient' - imported by botocore.vendored.requests.packages.urllib3.contrib.pyopenssl
missing module named ndg - imported by botocore.vendored.requests.packages.urllib3.contrib.pyopenssl
missing module named 'botocore.vendored.six.moves' - imported by botocore.compat
missing module named ElementC14N - imported by xml.etree.ElementTree
missing module named py - imported by pandas.io.common
missing module named s3fs - imported by pandas.io.common, pandas.io.s3
missing module named pudb - imported by pandas.util.testing
missing module named 'py.path' - imported by pandas.util.testing
missing module named pytest - imported by pandas.util._tester, pandas.util.testing
missing module named 'lxml.etree' - imported by html5lib.treebuilders.etree_lxml, pandas.io.html, pip._vendor.html5lib.treebuilders.etree_lxml
missing module named 'lxml.html' - imported by pandas.io.html
missing module named 'genshi.core' - imported by html5lib.treewalkers.genshi, pip._vendor.html5lib.treewalkers.genshi
missing module named genshi - imported by html5lib.treewalkers.genshi
missing module named datrie - imported by html5lib._trie.datrie, pip._vendor.html5lib._trie.datrie
missing module named 'six.moves.urllib' - imported by 'six.moves.urllib'
missing module named lxml - imported by pandas.io.html, html5lib.treewalkers.etree_lxml, pip._vendor.html5lib.treewalkers.etree_lxml
missing module named bs4 - imported by pandas.io.html
missing module named pandas.option_context - imported by pandas, pandas.io.clipboards
missing module named pandas.Interval - imported by pandas, pandas.core.reshape.tile
missing module named pandas.Timedelta - imported by pandas, pandas.core.reshape.tile, pandas.core.reshape.merge
missing module named pandas.RangeIndex - imported by pandas, pandas.io.packers, pandas.io.feather_format, pandas.util.testing
missing module named pandas.Period - imported by pandas, pandas.io.packers
missing module named pandas.NaT - imported by pandas, pandas.io.packers
missing module named pandas.CategoricalIndex - imported by pandas, pandas.io.packers, pandas.core.dtypes.concat, pandas.util.testing
missing module named pandas.concat - imported by pandas, pandas.io.pytables, pandas.core.groupby, pandas.core.generic, pandas.core.sparse.frame
missing module named pandas.SparseDataFrame - imported by pandas, pandas.io.pytables
missing module named pandas.Int64Index - imported by pandas, pandas.io.pytables, pandas.io.packers, pandas.io.feather_format, pandas.core.algorithms
missing module named pandas.SparseSeries - imported by pandas, pandas.io.pytables
missing module named pandas.Panel4D - imported by pandas, pandas.io.pytables, pandas.util.testing
missing module named pandas.isnull - imported by pandas, pandas.io.json.json, pandas.io.pytables, pandas.io.stata
missing module named pandas.Float64Index - imported by pandas, pandas.core.internals, pandas.io.packers
missing module named pandas.Timestamp - imported by pandas, pandas.core.indexes.timedeltas, pandas.io.packers, pandas.core.reshape.tile
missing module named pandas.Panel - imported by pandas, pandas.core.indexing, pandas.io.pytables, pandas.io.packers, pandas.core.window, pandas.util.testing, tqdm._tqdm
missing module named pandas.DataFrame - imported by pandas, pandas.core.reshape.concat, pandas.core.indexing, pandas.core.indexes.timedeltas, pandas.io.json.json, pandas.io.json.normalize, pandas.io.pytables, pandas.io.packers, pandas.core.window, pandas.core.reshape.merge, pandas.plotting._tools, pandas.plotting._core, pandas.core.indexes.multi, pandas.io.clipboards, pandas.core.generic, pandas.io.feather_format, pandas.core.base, pandas.core.strings, pandas.core.tools.datetimes, pandas.core.reshape.pivot, pandas.util.testing
missing module named pandas.factorize - imported by pandas, pandas.core.util.hashing
missing module named pandas.MultiIndex - imported by pandas, pandas.core.util.hashing, pandas.core.reshape.concat, pandas.io.json.json, pandas.io.pytables, pandas.io.packers, pandas.core.window, pandas.core.reshape.merge, pandas.io.formats.excel, pandas.core.strings, pandas.core.reshape.pivot, pandas.util.testing
missing module named pandas.Index - imported by pandas, pandas.core.algorithms, pandas.core.util.hashing, pandas.core.reshape.concat, pandas.core.categorical, pandas.io.pytables, pandas.io.packers, pandas.core.reshape.merge, pandas.compat.pickle_compat, pandas.io.formats.excel, pandas.core.dtypes.concat, pandas.core.base, pandas.core.strings, pandas.core.tools.datetimes, pandas.core.reshape.pivot, pandas.util.testing
missing module named pandas.DatetimeIndex - imported by pandas, pandas.core.algorithms, pandas.core.missing, pandas.core.indexes.timedeltas, pandas.io.pytables, pandas.io.packers, pandas.io.stata, pandas.util.testing
missing module named pandas.PeriodIndex - imported by pandas, pandas.core.algorithms, pandas.io.pytables, pandas.io.packers, pandas.io.formats.excel, pandas.util.testing
missing module named pandas.to_numeric - imported by pandas, pandas.core.dtypes.cast, pandas.core.tools.datetimes
missing module named pandas.to_timedelta - imported by pandas, pandas.core.dtypes.cast, pandas.core.groupby, pandas.core.reshape.tile, pandas.io.stata, pandas.core.tools.datetimes
missing module named pandas.TimedeltaIndex - imported by pandas, pandas.core.tools.timedeltas, pandas.core.algorithms, pandas.io.pytables, pandas.core.indexes.datetimes, pandas.util.testing
missing module named pandas.to_datetime - imported by pandas, pandas.core.dtypes.cast, pandas.io.json.json, pandas.core.groupby, pandas.core.reshape.tile, pandas.core.generic, pandas.io.stata
missing module named pandas.Series - imported by pandas, pandas.core.dtypes.missing, pandas.core.tools.timedeltas, pandas.core.algorithms, pandas.core.util.hashing, pandas.core.reshape.concat, pandas.core.missing, pandas.core.categorical, pandas.core.indexing, pandas.io.json.json, pandas.io.pytables, pandas.io.packers, pandas.core.window, pandas.core.reshape.tile, pandas.core.reshape.merge, pandas.plotting._core, pandas.core.indexes.multi, pandas.core.generic, pandas.core.dtypes.concat, pandas.core.indexes.datetimes, pandas.io.formats.format, pandas.core.base, pandas.core.indexes.base, pandas.core.indexes.accessors, pandas.core.tools.datetimes, pandas.core.reshape.pivot, pandas.io.html, pandas.util.testing
missing module named pandas.IntervalIndex - imported by pandas, pandas.core.dtypes.missing, pandas.core.reshape.tile, pandas.core.indexes.category, pandas.util.testing
missing module named pandas.Categorical - imported by pandas, pandas.core.dtypes.missing, pandas.core.util.hashing, pandas.io.packers, pandas.core.reshape.tile, pandas.core.reshape.merge, pandas.core.indexes.interval, pandas.core.dtypes.concat, pandas.core.dtypes.common, pandas.util.testing
missing module named pandas.get_option - imported by pandas, pandas.io.formats.console, pandas.io.clipboards
missing module named _datetime - imported by future.backports.datetime
missing module named reprlib.recursive_repr - imported by reprlib, future.backports.misc, pip._vendor.distlib.compat
missing module named _thread.get_ident - imported by _thread, future.backports.misc, pandas.compat.chainmap_impl
missing module named builtins.str - imported by builtins, numpy.core.numerictypes, numpy.lib._iotools, numpy, rasa_nlu.model, rasa_nlu.training_data, rasa_nlu.extractors.duckling_extractor, rasa_nlu.extractors.entity_synonyms, rasa_nlu.extractors.crf_entity_extractor, rasa_nlu.featurizers.mitie_featurizer, rasa_nlu.featurizers.regex_featurizer, rasa_nlu.tokenizers.mitie_tokenizer, rasa_nlu.utils.mitie_utils
missing module named builtins.bool - imported by builtins, numpy.core.numerictypes, numpy.lib._iotools, numpy
missing module named builtins.complex - imported by builtins, numpy.core.numerictypes, numpy.lib._iotools, numpy
missing module named builtins.float - imported by builtins, numpy.core.numerictypes, numpy.lib._iotools, numpy
missing module named builtins.int - imported by builtins, numpy.core.numerictypes, numpy.lib._iotools, numpy
missing module named builtins.object - imported by builtins, numpy.core.numerictypes, numpy.lib._iotools, numpy, rasa_nlu.model, rasa_nlu.components, rasa_nlu.config, rasa_nlu.training_data, rasa_nlu.tokenizers, rasa_nlu.persistor
missing module named vms_lib - imported by platform
missing module named java - imported by platform, pip._vendor.distlib.scripts
missing module named MacOS - imported by platform
missing module named macresource - imported by MacOS
missing module named gestalt - imported by platform
missing module named pyimod03_importers - imported by C:\Users\Namec\AppData\Local\Continuum\Anaconda3\envs\py27_cx_freeze\lib\site-packages\PyInstaller\loader\rthooks\pyi_rth_pkgres.py
missing module named 'multiprocessing.popen_fork' - imported by C:\Users\Namec\AppData\Local\Continuum\Anaconda3\envs\py27_cx_freeze\lib\site-packages\PyInstaller\loader\rthooks\pyi_rth_multiprocessing.py
missing module named 'multiprocessing.popen_spawn_win32' - imported by C:\Users\Namec\AppData\Local\Continuum\Anaconda3\envs\py27_cx_freeze\lib\site-packages\PyInstaller\loader\rthooks\pyi_rth_multiprocessing.py
missing module named 'multiprocessing.semaphore_tracker' - imported by C:\Users\Namec\AppData\Local\Continuum\Anaconda3\envs\py27_cx_freeze\lib\site-packages\PyInstaller\loader\rthooks\pyi_rth_multiprocessing.py
missing module named 'multiprocessing.spawn' - imported by C:\Users\Namec\AppData\Local\Continuum\Anaconda3\envs\py27_cx_freeze\lib\site-packages\PyInstaller\loader\rthooks\pyi_rth_multiprocessing.py
missing module named html.unescape - imported by html, pip._vendor.distlib.compat
missing module named 'IPython.html.widgets' - imported by tqdm._tqdm_notebook
missing module named ipywidgets - imported by tqdm._tqdm_notebook
missing module named 'os.environ' - imported by tqdm._utils
missing module named mitie - imported by rasa_nlu.classifiers.mitie_intent_classifier, rasa_nlu.extractors.mitie_entity_extractor, rasa_nlu.featurizers.mitie_featurizer, rasa_nlu.tokenizers.mitie_tokenizer, rasa_nlu.utils.mitie_utils
missing module named 'sklearn.externals.six.moves' - imported by sklearn.utils.extmath, sklearn.multiclass, sklearn.model_selection._split, sklearn.model_selection._validation, sklearn.linear_model.least_angle, sklearn.linear_model.coordinate_descent, sklearn.random_projection, sklearn.linear_model.theil_sen
missing module named 'multiprocessing.context' - imported by sklearn.externals.joblib._multiprocessing_helpers
missing module named 'duckling.dim' - imported by rasa_nlu.extractors.duckling_extractor
missing module named duckling - imported by rasa_nlu.extractors.duckling_extractor
missing module named 'google.cloud' - imported by rasa_nlu.persistor
missing module named janome - imported by spacy.ja
missing module named jieba - imported by spacy.zh
missing module named 'pip._vendor.six.moves' - imported by pip._vendor.pkg_resources, pip.utils, pip.vcs, pip.vcs.subversion, pip.index, pip.download, pip.models.index, pip.wheel, pip._vendor.html5lib._inputstream, pip._vendor.html5lib.filters.sanitizer, pip.vcs.mercurial, pip.vcs.git, pip.baseparser, pip._vendor.packaging.requirements, pip.req.req_install, pip.req.req_file, pip.commands.search
missing module named com - imported by pip._vendor.appdirs
missing module named _frozen_importlib - imported by pip._vendor.distlib.resources
missing module named _frozen_importlib_external - imported by pip._vendor.distlib.resources
missing module named redis - imported by pip._vendor.cachecontrol.caches
missing module named 'pip._vendor.requests.packages.urllib3.packages.six.moves' - imported by pip._vendor.requests.packages.urllib3.util.response, pip._vendor.requests.packages.urllib3.response
missing module named ipaddr - imported by pip.compat
missing module named _manylinux - imported by pip.pep425tags
missing module named webapp2 - imported by oauth2client.contrib.appengine
missing module named 'google.appengine' - imported by httplib2, oauth2client.client, oauth2client.contrib.appengine, oauth2client.contrib._appengine_ndb, googleapiclient.discovery_cache, googleapiclient.discovery_cache.appengine_memcache
missing module named 'Crypto.Util' - imported by oauth2client._pycrypto_crypt
missing module named 'Crypto.Signature' - imported by oauth2client._pycrypto_crypt
missing module named 'Crypto.PublicKey' - imported by oauth2client._pycrypto_crypt
missing module named Crypto - imported by oauth2client._pycrypto_crypt
missing module named psyco - imported by rsa.transform
missing module named oauth2client.util - imported by oauth2client, googleapiclient.http, googleapiclient.errors, googleapiclient.schema, googleapiclient.discovery
missing module named google - imported by httplib2
missing module named ca_certs_locater - imported by httplib2
missing module named 'email.FeedParser' - imported by httplib2
missing module named 'oauth2client.locked_file' - imported by googleapiclient.discovery_cache.file_cache
missing module named 'oauth2client.contrib.locked_file' - imported by googleapiclient.discovery_cache.file_cache
missing module named google_auth_httplib2 - imported by googleapiclient._auth
missing module named 'google.auth' - imported by googleapiclient._auth
ctrado18 commented 7 years ago

Do you need anymore information? The infos here are a bit complex to understand and how to process those:

https://pythonhosted.org/PyInstaller/when-things-go-wrong.html

So I think the problems are easy to solve. But there are no easy information how to include those missing modules.

ghost commented 7 years ago

Does the exe run? And if not what is the traceback?

ctrado18 commented 7 years ago

Thanks. No! Running exe gives alway (including those warning messages above)

Traceback (most recent call last):
  File "test.py", line 6, in <module>
  File "c:\python\env\Lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 396, in load_module
    exec(bytecode, module.__dict__)
  File "site-packages\spacy\__init__.py", line 4, in <module>
  File "c:\python\env\Lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 396, in load_module
    exec(bytecode, module.__dict__)
  File "site-packages\spacy\util.py", line 10, in <module>
  File "c:\python\env\Lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 396, in load_module
    exec(bytecode, module.__dict__)
  File "site-packages\spacy\compat.py", line 5, in <module>
  File "c:\python\env\Lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 396, in load_module
    exec(bytecode, module.__dict__)
  File "site-packages\ftfy\__init__.py", line 12, in <module>
  File "c:\python\env\Lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 396, in load_module
    exec(bytecode, module.__dict__)
  File "site-packages\ftfy\fixes.py", line 12, in <module>
  File "c:\python\env\Lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 396, in load_module
    exec(bytecode, module.__dict__)
  File "site-packages\ftfy\chardata.py", line 145, in <module>
  File "site-packages\pkg_resources\__init__.py", line 1233, in resource_string
  File "site-packages\pkg_resources\__init__.py", line 1475, in get_resource_string
  File "site-packages\pkg_resources\__init__.py", line 1548, in _get
  File "c:\python\env\Lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 479, in get_data
    with open(path, 'rb') as fp:
IOError: [Errno 2] No such file or directory: u'C:\\Users\\Namec\\Desktop\\RASA_N~1\\dist\\test\\ftfy\\char_classes.dat'
[11172] Failed to execute script test
ctrado18 commented 7 years ago

Furthermore: I have created now an virtualenv plus the latest dev pyinstaller. It also gives with

pyinstaller --onefile test.py

the early pywin32 import warning although I installed it!!

ghost commented 7 years ago

Use onedir to debug and place char_clases.dat in the same folder as the exe.

ctrado18 commented 7 years ago

Thanks. I have created the folder ftfy like mentioned in the traceback not only copied the file char.dat. Now since this folder exists with this data it works and now comes "easy" error:


Traceback (most recent call last):
  File "test.py", line 6, in <module>
  File "c:\python\env\Lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 396, in load_module
    exec(bytecode, module.__dict__)
  File "site-packages\spacy\__init__.py", line 5, in <module>
  File "c:\python\env\Lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 396, in load_module
    exec(bytecode, module.__dict__)
  File "site-packages\spacy\deprecated.py", line 8, in <module>
  File "c:\python\env\Lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 396, in load_module
    exec(bytecode, module.__dict__)
  File "site-packages\spacy\cli\__init__.py", line 5, in <module>
  File "c:\python\env\Lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 396, in load_module
    exec(bytecode, module.__dict__)
  File "site-packages\spacy\cli\train.py", line 8, in <module>
  File "c:\python\env\Lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 396, in load_module
    exec(bytecode, module.__dict__)
  File "site-packages\spacy\scorer.py", line 4, in <module>
  File "c:\python\env\Lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 687, in load_module
    module = imp.load_module(fullname, fp, filename, ext_tuple)
  File ".env/lib/python2.7/site-packages/cymem/cymem.pxd", line 1, in init spacy.gold (spacy/gold.cpp:23496)
ImportError: No module named cymem.cymem
[10564] Failed to execute script test

I think those are the common Import Errors. But I really dont understand how to proceed! The doc site from here are a bit to advanced with no examples where and in what files I have to add the proper paths to those modules etc...

ctrado18 commented 7 years ago

If I do:

pyinstaller --onedir --hidden-import=cymen.cymen test.py

The same error occurs that cymen.cymen is not found...

I looked into scorer.py where:

from .gold import tags_to_entities

Then in gold.pxd

from cymem.cymem cimport Pool

So should I import cymen.cymen or Pool?

Is the process different because it hase to do with .pxd files and cython?

ctrado18 commented 7 years ago

Now It works with only one hidden import. cymem.cymem works. No it wants module map:

Traceback (most recent call last):
  File "test.py", line 6, in <module>
  File "c:\python\env\Lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 396, in load_module
    exec(bytecode, module.__dict__)
  File "site-packages\spacy\__init__.py", line 5, in <module>
  File "c:\python\env\Lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 396, in load_module
    exec(bytecode, module.__dict__)
  File "site-packages\spacy\deprecated.py", line 8, in <module>
  File "c:\python\env\Lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 396, in load_module
    exec(bytecode, module.__dict__)
  File "site-packages\spacy\cli\__init__.py", line 5, in <module>
  File "c:\python\env\Lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 396, in load_module
    exec(bytecode, module.__dict__)
  File "site-packages\spacy\cli\train.py", line 8, in <module>
  File "c:\python\env\Lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 396, in load_module
    exec(bytecode, module.__dict__)
  File "site-packages\spacy\scorer.py", line 4, in <module>
  File "c:\python\env\Lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 687, in load_module
    module = imp.load_module(fullname, fp, filename, ext_tuple)
  File ".env/lib/python2.7/site-packages/preshed/maps.pxd", line 36, in init spacy.gold (spacy/gold.cpp:23499)
ImportError: No module named maps
[10092] Failed to execute script test

So I did

pyinstaller --onedir --hidden-import=cymen.cymen --hidden-import=maps test.py

But still same Traceback!

Where is this hidden import, because in

File ".env/lib/python2.7/site-packages/preshed/maps.pxd", line 36, in init spacy.gold (spacy/gold.cpp:23499)

there is no imported map or something else...

ctrado18 commented 7 years ago

@xoviat So I find out the this has to do with cython. Now im taggling to find out where I have to put the cython module in the .spec file.

I have now tried:

# -*- mode: python -*-

block_cipher = None

bin=[('C:\\Python\\env\\Lib\\site-packages\\spacy\\gold.pxd','spacy'),('C:\\Python\\env\\Lib\\site-packages\\preshed\\maps.pxd','cy')]

a = Analysis(['test.py'],
             pathex=['C:\\Users\\name\\Desktop\\test'],
             binaries=bin,
             datas=[],
             hiddenimports=['cymem.cymem'],
             hookspath=[],
             runtime_hooks=[],
             excludes=[],
             win_no_prefer_redirects=False,
             win_private_assemblies=False,
             cipher=block_cipher)
pyz = PYZ(a.pure, a.zipped_data,
             cipher=block_cipher)
exe = EXE(pyz,
          a.scripts,
          exclude_binaries=True,
          name='test',
          debug=False,
          strip=False,
          upx=True,
          console=True )
coll = COLLECT(exe,
               a.binaries,
               a.zipfiles,
               a.datas,
               strip=False,
               upx=True,
               name='test')

But still it cant find maps.pxd...


It might have something to do with TOC. But I cannot find an simple example where a cython module is includes within a TOC and how to do that. Eg sould I write it within binaries=['maps.pxd']:

or in the Analysis part something like TOC(name, pathe, EXTENSION)

Sorry, but the docs are quite not understandable for me. If ther would be a simple example then it should be clear.:-)

ghost commented 7 years ago

maps.pxd is a data file. Include the full path in datas

ctrado18 commented 7 years ago

Thank you! I hope you can furrther help me further. So you mean in above the analysis class (and only?)

datas=bin?

This yields same error...

Furthermore soemthing in very strange in:

File ".env/lib/python2.7/site-packages/preshed/maps.pxd", line 36, in init spacy.gold (spacy/gold.cpp:23499)

What is this path ".env/lib/"? This does not exist on my system! Im am using a virtual environment... With this I also detect something that it outputs that distutils is retatgeting to non-virtualenv

Maybe the disutils hook redirects to the wrong path for maps.pxd?

@xoviat @

ctrado18 commented 7 years ago

I found that adding maps.pxd to data was not successful. But instead importing it directy in my script gives success. So I need to import every module manually by :

from preshed import maps e.g.

So I have to it for many modules like string.pxd in the spacy package:

import spacy (is this problematic?) from spacy import strings Actually I have to include evergy pxd file in the spacy package like this.

Can I circumvent this by adding a path manually somewehere in the spec file?

htgoebel commented 6 years ago

Adding the path does not help. But you can write a hook (resp. two hooks: one for preshed, one for spacy) to search for all these modules and add them as hidden imports. We'd appreciate if you publish the hooks then :-)

Please have a look at https://pyinstaller.readthedocs.io/en/latest/hooks.html, esp. https://pyinstaller.readthedocs.io/en/latest/hooks.html#useful-items-in-pyinstaller-utils-hooks I'm not sure if collect_submodules() works as expected. If not use get_package_paths() and glob.glob() to collect the files (you need to convert them to submodule-names, though).

timtutt commented 6 years ago

Was there ever any resolution on this or hooks created? I'm running into the same issue actually and I'm not quite sure how to create the hooks necessary.

htgoebel commented 6 years ago

@timtutt See https://github.com/pyinstaller/pyinstaller/issues/2806#issuecomment-349637492 – still somebody needs to implement the solution

wandonye commented 6 years ago

What learned from this thread is that whenever I see some module not found, I can import it in my .py which is fed to pyinstaller. So I'm doing this iteratively for spacy:

Here is what I have now. It is still growing:

from cymem import cymem
from thinc import linalg
from thinc.neural import ops
from murmurhash import mrmr
import dill
from cytoolz import utils, _signatures
from spacy import strings, morphology, vocab, lexeme, parts_of_speech, pipeline, language, syntax
from spacy.tokens import underscore, printers, _retokenize
from spacy.syntax import stateclass, transition_system

I tried creating hook-space.py, with

from PyInstaller.utils.hooks import collect_data_files

datas = collect_data_files('spacy')

Doesn't work. I don't understand the glob.glob method. Where to put it? what to glob?

Will keep growing the import list. Stay in tune, or let me know if there is an easier way out.

timtutt commented 6 years ago

@wandonye - I abandoned this method in favor of Pex which is amazing. Has it's own issues, but much easier to use.

wandonye commented 6 years ago

@timtutt Thanks for the info. I will take a look at Pex. With my approach above, I have the complete list for spacy now, but still need to incorporate the model data.

farlee2121 commented 6 years ago

I made it to the bottom of the rabbit hole. Expanding on wandonye's comment , the final import list is

from cymem import cymem
from thinc import linalg, linear, extra
from thinc.neural import ops
from thinc.linear import avgtron, features, sparse, serialize
from thinc.extra import eg, mb, search
from murmurhash import mrmr
import dill
from cytoolz import utils, _signatures
from spacy import strings, morphology, vocab, lexeme, parts_of_speech, pipeline, language, syntax, cfile, serialize
from spacy.tokens import printers 
from spacy.syntax import stateclass, transition_system, iterators, _parse_features, beam_parser
from spacy.serialize import bits, packer, huffman

You will also need to copy ftfy/char_classes.dat and the language model files (usually en_core_web_sm).

I'm currently working on the hook file, which I'd be happy to contribute

farlee2121 commented 6 years ago

I'm currently working on a hook file for spacy. The hidden imports weren't a problem, but i'm very confused by data files.

According to this documentation, I should just be able to add a datas tuple to the hook file, like so datas = [("ftfy/char_classes.dat", "ftfy")]

I've tried many variants of this (and pkgutil.get_data) and looked all around the documentation to no avail. It doesn't seem to do anything.

Update (2018-08-01): I've gotten datas to work from my .spec with a relative path to my virtualenv. However, the same scheme silently fails (or does nothing) from the hook file. A relative path won't work independent of dev environment either.

I've also tried splitting out a separate hook file for ftfy, with no effect.

asarmohd commented 5 years ago

@farlee2121 : Please share if you have the hook file ready

htgoebel commented 5 years ago

@farlee2121 Goof to hear you are working on a hook.

Not sure I understoodd what the excat problem is, but two points:

farlee2121 commented 5 years ago

Shoot. I don't currently have access to the project where I did that work. I'll see if I can get a copy of the hook file.

Legorooj commented 4 years ago

What's the status on this folks?

farlee2121 commented 4 years ago

The company never replied to me and I think they went out of business. I'll try one more time, but I don't have high hopes

Legorooj commented 4 years ago

@farlee2121 why was your code there in the first place?

farlee2121 commented 4 years ago

@Legorooj Because I wrote the code for that company while working for that company

Legorooj commented 4 years ago

@farlee2121 thought so. Can you remember any of the code?

farlee2121 commented 4 years ago

It's not really that kind of code. I basically just kept adding dependencies to the list until the generated executable stopped complaining

Legorooj commented 4 years ago

@farlee2121 ah that method. Well let us know if you have any luck with the company - maybe you know one of the workers there? They might respond faster.