missing module named 'multiprocessing.forking' - imported by c:\users\emils\anaconda3\lib\site-packages\PyInstaller\loader\rthooks\pyi_rth_multiprocessing.py (optional) missing module named _scproxy - imported by urllib.request (conditional) missing module named termios - imported by tty (top-level), getpass (optional), psutil._compat (delayed, optional), py._io.terminalwriter (delayed, conditional) missing module named pwd - imported by posixpath (delayed, conditional), shutil (optional), tarfile (optional), http.server (delayed, optional), webbrowser (delayed), pathlib (delayed, conditional, optional), distutils.util (delayed, conditional, optional), distutils.archive_util (optional), netrc (delayed, conditional), getpass (delayed), pathlib2 (delayed, conditional, optional), psutil (optional), py._path.local (delayed) missing module named org - imported by copy (optional) missing module named urllib.quote - imported by urllib (optional), pathlib2 (optional), py._path.svnwc (delayed) missing module named urllib.pathname2url - imported by urllib (conditional), PyInstaller.lib.modulegraph._compat (conditional) missing module named 'org.python' - imported by pickle (optional), xml.sax (delayed, conditional), setuptools.sandbox (conditional) missing module named 'java.lang' - imported by platform (delayed, optional), xml.sax._exceptions (conditional) missing module named multiprocessing.get_context - imported by multiprocessing (top-level), multiprocessing.pool (top-level), multiprocessing.managers (top-level), multiprocessing.sharedctypes (top-level) missing module named multiprocessing.TimeoutError - imported by multiprocessing (top-level), multiprocessing.pool (top-level) missing module named multiprocessing.BufferTooShort - imported by multiprocessing (top-level), multiprocessing.connection (top-level) missing module named multiprocessing.AuthenticationError - imported by multiprocessing (top-level), multiprocessing.connection (top-level) missing module named importlib.metadata - imported by importlib (conditional), pluggy.manager (conditional), _pytest.compat (conditional) missing module named _frozen_importlib_external - imported by importlib._bootstrap (delayed), importlib (optional), importlib.abc (optional) excluded module named _frozen_importlib - imported by importlib (optional), importlib.abc (optional), PyInstaller.loader.pyimod02_archive (delayed, conditional) missing module named grp - imported by shutil (optional), tarfile (optional), pathlib (delayed), distutils.archive_util (optional), pathlib2 (delayed), py._path.local (delayed) missing module named _posixsubprocess - imported by subprocess (conditional), multiprocessing.util (delayed) missing module named multiprocessing.set_start_method - imported by multiprocessing (top-level), multiprocessing.spawn (top-level) missing module named multiprocessing.get_start_method - imported by multiprocessing (top-level), multiprocessing.spawn (top-level) missing module named multiprocessing.Manager - imported by multiprocessing (optional), nose.plugins.plugintest (optional) missing module named multiprocessing.current_process - imported by multiprocessing (delayed), nose.plugins.plugintest (delayed) missing module named posix - imported by os (conditional, optional) missing module named resource - imported by posix (top-level) missing module named 'win32com.gen_py' - imported by win32com (conditional, optional), c:\users\emils\anaconda3\lib\site-packages\PyInstaller\loader\rthooks\pyi_rth_win32comgenpy.py (top-level) missing module named pyimod03_importers - imported by PyInstaller.loader.pyimod02_archive (delayed, conditional), c:\users\emils\anaconda3\lib\site-packages\PyInstaller\loader\rthooks\pyi_rth_pkgres.py (top-level) missing module named 'pkg_resources.extern.pyparsing' - imported by pkg_resources._vendor.packaging.requirements (top-level), pkg_resources._vendor.packaging.markers (top-level) missing module named StringIO - imported by pyreadline.py3k_compat (conditional), PyInstaller.lib.modulegraph._compat (conditional), PyInstaller.lib.modulegraph.zipio (conditional), setuptools._vendor.six (conditional), six (conditional), numpy.testing._private.utils (conditional), numpy.lib.utils (delayed, conditional), numpy.lib.format (delayed, conditional), scipy._lib.six (conditional), pkg_resources._vendor.six (conditional), py._io.capture (optional) missing module named _uuid - imported by uuid (optional) missing module named console - imported by pyreadline.console.ansi (conditional) missing module named startup - imported by pyreadline.keysyms.common (conditional), pyreadline.keysyms.keysyms (conditional) missing module named sets - imported by pyreadline.keysyms.common (optional), nose.util (optional) missing module named System - imported by pyreadline.clipboard.ironpython_clipboard (top-level), pyreadline.keysyms.ironpython_keysyms (top-level), pyreadline.console.ironpython_console (top-level), pyreadline.rlmain (conditional) missing module named IronPythonConsole - imported by pyreadline.console.ironpython_console (top-level) missing module named clr - imported by pyreadline.clipboard.ironpython_clipboard (top-level), pyreadline.console.ironpython_console (top-level), nose.suite (conditional) missing module named __builtin__ - imported by numpy.core.numerictypes (conditional), numpy.core.numeric (conditional), numpy.lib.function_base (conditional), numpy.lib._iotools (conditional), numpy.ma.core (conditional), scipy._lib.six (conditional), numpy.distutils.misc_util (delayed, conditional), numpy (conditional), pkg_resources._vendor.pyparsing (conditional), py._builtin (conditional), setuptools._vendor.pyparsing (conditional) missing module named ordereddict - imported by pkg_resources._vendor.pyparsing (optional), setuptools._vendor.pyparsing (optional) missing module named 'com.sun' - imported by pkg_resources._vendor.appdirs (delayed, conditional, optional) missing module named com - imported by pkg_resources._vendor.appdirs (delayed) missing module named _winreg - imported by platform (delayed, optional), numpy.distutils.cpuinfo (delayed, conditional, optional), pkg_resources._vendor.appdirs (delayed, conditional) missing module named pkg_resources.extern.packaging - imported by pkg_resources.extern (top-level), pkg_resources (top-level) missing module named pkg_resources.extern.appdirs - imported by pkg_resources.extern (top-level), pkg_resources (top-level) missing module named 'pkg_resources.extern.six.moves' - imported by pkg_resources (top-level), pkg_resources._vendor.packaging.requirements (top-level) missing module named pkg_resources.extern.six - imported by pkg_resources.extern (top-level), pkg_resources (top-level), pkg_resources.py31compat (top-level) missing module named vms_lib - imported by platform (delayed, conditional, optional) missing module named java - imported by platform (delayed) missing module named PIL._imagingagg - imported by PIL (delayed, conditional, optional), PIL.ImageDraw (delayed, conditional, optional) missing module named PIL._webp - imported by PIL (optional), PIL.WebPImagePlugin (optional) missing module named 'PySide2.QtCore' - imported by PIL.ImageQt (conditional, optional) missing module named PySide2 - imported by PIL.ImageQt (conditional, optional) missing module named commands - imported by numpy.distutils.cpuinfo (conditional) missing module named setuptools.extern.packaging - imported by setuptools.extern (top-level), setuptools.dist (top-level), setuptools.command.egg_info (top-level) missing module named 'setuptools.extern.six' - imported by setuptools (top-level), setuptools.extension (top-level) missing module named 'setuptools.extern.packaging.specifiers' - imported by setuptools.config (top-level) missing module named 'setuptools.extern.packaging.version' - imported by setuptools.config (top-level), setuptools.msvc (top-level) missing module named setuptools.extern.six.moves.filterfalse - imported by setuptools.extern.six.moves (top-level), setuptools.dist (top-level), setuptools.msvc (top-level) missing module named setuptools.extern.six.moves.filter - imported by setuptools.extern.six.moves (top-level), setuptools.dist (top-level), setuptools.ssl_support (top-level), setuptools.command.py36compat (top-level) missing module named setuptools.extern.ordered_set - imported by setuptools.extern (top-level), setuptools.dist (top-level), setuptools.command.sdist (top-level) missing module named 'setuptools.extern.packaging.utils' - imported by setuptools.wheel (top-level) missing module named 'setuptools.extern.packaging.tags' - imported by setuptools.wheel (top-level) missing module named 'backports.ssl_match_hostname' - imported by setuptools.ssl_support (optional) missing module named 'setuptools._vendor.six.moves' - imported by 'setuptools._vendor.six.moves' (top-level) missing module named 'setuptools.extern.pyparsing' - imported by setuptools._vendor.packaging.requirements (top-level), setuptools._vendor.packaging.markers (top-level) missing module named _manylinux - imported by setuptools._vendor.packaging.tags (delayed, optional) missing module named setuptools.extern.six.moves.map - imported by setuptools.extern.six.moves (top-level), setuptools.dist (top-level), setuptools.command.easy_install (top-level), setuptools.sandbox (top-level), setuptools.package_index (top-level), setuptools.ssl_support (top-level), setuptools.command.egg_info (top-level), setuptools.namespaces (top-level) runtime module named setuptools.extern.six.moves - imported by setuptools.dist (top-level), setuptools.py33compat (top-level), configparser (top-level), setuptools.command.easy_install (top-level), setuptools.sandbox (top-level), setuptools.command.setopt (top-level), setuptools.package_index (top-level), setuptools.ssl_support (top-level), setuptools.command.egg_info (top-level), setuptools.command.py36compat (top-level), setuptools.namespaces (top-level), setuptools.msvc (top-level), 'setuptools._vendor.six.moves' (top-level) missing module named setuptools.extern.six - imported by setuptools.extern (top-level), setuptools.monkey (top-level), setuptools.dist (top-level), setuptools.extern.six.moves (top-level), setuptools.py33compat (top-level), setuptools.py27compat (top-level), setuptools.config (top-level), setuptools.command.easy_install (top-level), setuptools.sandbox (top-level), setuptools.package_index (top-level), setuptools.wheel (top-level), setuptools.command.egg_info (top-level), setuptools.command.sdist (top-level), setuptools.command.bdist_egg (top-level), setuptools.unicode_utils (top-level), setuptools.installer (top-level), setuptools.command.develop (top-level) missing module named 'numpy_distutils.cpuinfo' - imported by numpy.f2py.diagnose (delayed, conditional, optional) missing module named 'numpy_distutils.fcompiler' - imported by numpy.f2py.diagnose (delayed, conditional, optional) missing module named 'numpy_distutils.command' - imported by numpy.f2py.diagnose (delayed, conditional, optional) missing module named numpy_distutils - imported by numpy.f2py.diagnose (delayed, optional) missing module named __svn_version__ - imported by numpy.f2py.__version__ (optional) missing module named numarray - imported by numpy.distutils.system_info (delayed, conditional, optional) missing module named Numeric - imported by numpy.distutils.system_info (delayed, conditional, optional) missing module named ConfigParser - imported by numpy.distutils.system_info (conditional), numpy.distutils.npy_pkg_config (conditional) missing module named _curses - imported by curses (top-level), curses.has_key (top-level) missing module named _dummy_threading - imported by dummy_threading (optional) missing module named twisted - imported by _pytest.unittest (delayed) missing module named zope - imported by _pytest.unittest (delayed) missing module named py.process - imported by py (top-level), py._path.svnurl (top-level) missing module named py.path - imported by py (top-level), py._path.svnurl (top-level) missing module named apipkg - imported by py (optional) missing module named UserDict - imported by attr._compat (conditional) missing module named scandir - imported by pathlib2 (optional) missing module named 'backports.configparser' - imported by importlib_metadata._compat (conditional) missing module named asyncio.DefaultEventLoopPolicy - imported by asyncio (delayed, conditional), asyncio.events (delayed, conditional) missing module named 'ptyprocess.ptyprocess' - imported by pexpect.pty_spawn (top-level) missing module named ptyprocess - imported by pexpect.pty_spawn (top-level) missing module named fcntl - imported by atomicwrites (optional), psutil._compat (delayed, optional), py._io.terminalwriter (delayed, conditional), pty (delayed, optional) missing module named typing_extensions - imported by _pytest._code.code (conditional), _pytest._code.source (conditional) missing module named argcomplete - imported by _pytest._argcomplete (conditional, optional) missing module named syslog - imported by py._log.log (delayed, optional) missing module named 'py.builtin' - imported by py._io.terminalwriter (top-level) missing module named compiler - imported by nose.pyversion (conditional, optional), py._code._assertionold (top-level) missing module named new - imported by nose.pyversion (optional), nose.ext.dtcompat (delayed) missing module named IronPython - imported by nose.suite (conditional) missing module named unittest2 - imported by nose.plugins.skip (optional) missing module named numpy.lib.i0 - imported by numpy.lib (top-level), numpy.dual (top-level) missing module named uarray - imported by scipy._lib.uarray (conditional, optional) missing module named psutil._psutil_aix - imported by psutil (top-level), psutil._psaix (top-level) missing module named psutil._psutil_sunos - imported by psutil (top-level), psutil._pssunos (top-level) missing module named psutil._psutil_bsd - imported by psutil (top-level), psutil._psbsd (top-level) missing module named psutil._psutil_osx - imported by psutil (top-level), psutil._psosx (top-level) missing module named _psutil_linux - imported by psutil (conditional) missing module named psutil._psutil_posix - imported by psutil (top-level), psutil._pslinux (top-level), psutil._psosx (top-level), psutil._psbsd (top-level), psutil._pssunos (top-level), psutil._psaix (top-level) missing module named dummy_thread - imported by cffi.lock (conditional, optional), numpy.core.arrayprint (conditional, optional) missing module named thread - imported by cffi.lock (conditional, optional), cffi.cparser (conditional, optional), PyInstaller.loader.pyimod02_archive (conditional), numpy.core.arrayprint (conditional, optional) missing module named numpy.random.randn - imported by numpy.random (top-level), scipy (top-level) missing module named numpy.random.rand - imported by numpy.random (top-level), scipy (top-level) missing module named numpy.core.number - imported by numpy.core (delayed), numpy.testing._private.utils (delayed) missing module named numpy.core.object_ - imported by numpy.core (top-level), numpy.linalg.linalg (top-level), numpy.testing._private.utils (delayed) missing module named numpy.core.signbit - imported by numpy.core (delayed), numpy.testing._private.utils (delayed) missing module named numpy.core.float32 - imported by numpy.core (top-level), numpy.testing._private.utils (top-level) missing module named numpy.core.intp - imported by numpy.core (top-level), numpy.testing._private.utils (top-level), numpy.linalg.linalg (top-level) missing module named cpickle - imported by numpy.compat.py3k (conditional) missing module named pickle5 - imported by numpy.compat.py3k (conditional, optional) missing module named numpy.core.integer - imported by numpy.core (top-level), numpy.fft.helper (top-level) missing module named numpy.core.sqrt - imported by numpy.core (top-level), numpy.linalg.linalg (top-level), numpy.fft._pocketfft (top-level) missing module named numpy.core.conjugate - imported by numpy.core (top-level), numpy.fft._pocketfft (top-level) missing module named numpy.core.sign - imported by numpy.core (top-level), numpy.linalg.linalg (top-level) missing module named numpy.core.divide - imported by numpy.core (top-level), numpy.linalg.linalg (top-level) missing module named numpy.core.geterrobj - imported by numpy.core (top-level), numpy.linalg.linalg (top-level) missing module named numpy.core.add - imported by numpy.core (top-level), numpy.linalg.linalg (top-level) missing module named numpy.core.complexfloating - imported by numpy.core (top-level), numpy.linalg.linalg (top-level) missing module named numpy.core.inexact - imported by numpy.core (top-level), numpy.linalg.linalg (top-level) missing module named numpy.core.cdouble - imported by numpy.core (top-level), numpy.linalg.linalg (top-level) missing module named numpy.core.csingle - imported by numpy.core (top-level), numpy.linalg.linalg (top-level) missing module named numpy.core.double - imported by numpy.core (top-level), numpy.linalg.linalg (top-level) missing module named numpy.core.single - imported by numpy.core (top-level), numpy.linalg.linalg (top-level) missing module named future_builtins - imported by numpy.lib.npyio (conditional) missing module named urllib2 - imported by numpy.lib._datasource (delayed, conditional) missing module named urlparse - imported by numpy.lib._datasource (delayed, conditional) missing module named copy_reg - imported by cPickle (top-level), cStringIO (top-level), numpy.core (conditional) missing module named numpy.recarray - imported by numpy (top-level), numpy.ma.mrecords (top-level) missing module named numpy.dtype - imported by numpy (top-level), numpy.ma.mrecords (top-level), numpy.ctypeslib (top-level) missing module named numpy.expand_dims - imported by numpy (top-level), numpy.ma.core (top-level) missing module named numpy.array - imported by numpy (top-level), numpy.ma.core (top-level), numpy.ma.extras (top-level), numpy.ma.mrecords (top-level), numpy.ctypeslib (top-level) missing module named numpy.bool_ - imported by numpy (top-level), numpy.ma.core (top-level), numpy.ma.mrecords (top-level) missing module named numpy.iscomplexobj - imported by numpy (top-level), numpy.ma.core (top-level) missing module named numpy.amin - imported by numpy (top-level), numpy.ma.core (top-level) missing module named numpy.amax - imported by numpy (top-level), numpy.ma.core (top-level) missing module named numpy.ndarray - imported by numpy (top-level), numpy.ma.core (top-level), numpy.ma.extras (top-level), numpy.ma.mrecords (top-level), numpy.ctypeslib (top-level) missing module named numpy.histogramdd - imported by numpy (delayed), numpy.lib.twodim_base (delayed) missing module named numpy.eye - imported by numpy (delayed), numpy.core.numeric (delayed) missing module named cStringIO - imported by cPickle (top-level), cffi.ffiplatform (optional) missing module named cPickle - imported by pycparser.ply.yacc (delayed, optional) missing module named cffi._pycparser - imported by cffi (optional), cffi.cparser (optional) missing module named ImageFont - imported by barcode.writer (optional) missing module named ImageDraw - imported by barcode.writer (optional) missing module named Image - imported by barcode.writer (optional)
pyinstaller kled.py --windowedHere is the error message I get when I execute the terminal file located in dist(a folder called kled)(executable terminal file called kled)
[3173] Error loading Python lib '/Users/john/Documents/chill.py/kledfinal/dist/kled/Python': dlopen: dlopen(/Users/john/Documents/chill.py/kledfinal/dist/kled/Python, 10): no suitable image found. Did find: /Users/john/Documents/chill.py/kledfinal/dist/kled/Python: code signature invalid for '/Users/john/Documents/chill.py/kledfinal/dist/kled/Python'
# -*- mode: python ; coding: utf-8 -*- block_cipher = None a = Analysis(['kled.py'], pathex=['/Users/john/Documents/chill.py/kledfinal'], binaries=[], datas=[], hiddenimports=[], hookspath=[], runtime_hooks=[], excludes=[], win_no_prefer_redirects=False, win_private_assemblies=False, cipher=block_cipher, noarchive=False) pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher) exe = EXE(pyz, a.scripts, a.binaries, a.zipfiles, a.datas, [], name='kled', debug=False, bootloader_ignore_signals=False, strip=False, upx=True, upx_exclude=[], runtime_tmpdir=None, console=False ) app = BUNDLE(exe, name='kled.app', icon=None, bundle_identifier=None)
This file lists modules PyInstaller was not able to find. This does not necessarily mean this module is required for running you program. Python and Python 3rd-party packages include a lot of conditional or optional modules. For example the module 'ntpath' only exists on Windows, whereas the module 'posixpath' only exists on Posix systems. Types if import: * top-level: imported at the top-level - look at these first * conditional: imported within an if-statement * delayed: imported from within a function * optional: imported within a try-except-statement IMPORTANT: Do NOT post this list to the issue-tracker. Use it as a basis for yourself tracking down the missing module. Thanks! missing module named pyimod03_importers - imported by /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/PyInstalleloaderthooks/pyi_rth_pkgres.py (top-level) missing module named StringIO - imported by setuptools._vendor.six (conditional), numpy.testing._private.utils (conditional), numpy.lib.utils (delayed, conditional), numpy.lib.format (delayed, conditional), pkg_resources._vendor.six (conditional), py._io.capture (optional) missing module named 'pkg_resources.extern.pyparsing' - imported by pkg_resources._vendor.packaging.markers (top-level), pkg_resources._vendor.packaging.requirements (top-level) missing module named 'win32com.shell' - imported by pkg_resources._vendor.appdirs (conditional, optional) missing module named 'com.sun' - imported by pkg_resources._vendor.appdirs (delayed, conditional, optional) missing module named com - imported by pkg_resources._vendor.appdirs (delayed) missing module named nt - imported by os (delayed, conditional, optional), ntpath (optional), shutil (conditional), pathlib (conditional), ctypes (delayed, conditional) missing module named win32api - imported by distutils.msvccompiler (optional), pkg_resources._vendor.appdirs (delayed, conditional, optional) missing module named win32com - imported by pkg_resources._vendor.appdirs (delayed) missing module named _winreg - imported by platform (delayed, optional), pygame.sysfont (conditional), numpy.distutils.cpuinfo (delayed, conditional, optional), pkg_resources._vendor.appdirs (delayed, conditional), pygments.formatters.img (optional) missing module named winreg - imported by platform (delayed, optional), mimetypes (optional), urllib.request (delayed, conditional, optional), pygame.sysfont (conditional), distutils.msvccompiler (optional), distutils.msvc9compiler (top-level), distutils._msvccompiler (top-level), numpy.distutils.cpuinfo (delayed, conditional, optional), pkg_resources._vendor.appdirs (delayed, conditional), pygments.formatters.img (optional) missing module named netbios - imported by uuid (delayed) missing module named win32wnet - imported by uuid (delayed) missing module named _winapi - imported by encodings (delayed, conditional, optional), subprocess (optional), test.support (delayed, conditional), multiprocessing.connection (optional), multiprocessing.spawn (delayed, conditional), multiprocessing.reduction (conditional), multiprocessing.shared_memory (conditional), multiprocessing.heap (conditional), multiprocessing.popen_spawn_win32 (top-level), asyncio.windows_events (top-level), asyncio.windows_utils (top-level) missing module named msvcrt - imported by subprocess (optional), getpass (optional), test.support (delayed, conditional, optional), multiprocessing.spawn (delayed, conditional), multiprocessing.popen_spawn_win32 (top-level), asyncio.windows_events (top-level), asyncio.windows_utils (top-level), numpy.distutils.mingw32ccompiler (conditional, optional) missing module named urllib.urlretrieve - imported by urllib (conditional, optional), pygments.lexers._php_builtins (conditional, optional) missing module named urllib.FancyURLopener - imported by urllib (conditional, optional), pygments.lexers._sourcemod_builtins (conditional, optional) missing module named urllib.urlopen - imported by urllib (conditional, optional), pygments.lexers._postgres_builtins (conditional, optional), pygments.lexers._lua_builtins (conditional, optional) missing module named urllib.quote - imported by urllib (delayed), py._path.svnwc (delayed) missing module named _frozen_importlib_external - imported by importlib._bootstrap (delayed), importlib (optional), importlib.abc (optional), zipimport (top-level) excluded module named _frozen_importlib - imported by importlib (optional), importlib.abc (optional), zipimport (top-level) missing module named __builtin__ - imported by numpy.core.numerictypes (conditional), numpy.core.numeric (conditional), numpy.lib.function_base (conditional), numpy.lib._iotools (conditional), numpy.ma.core (conditional), numpy.distutils.misc_util (delayed, conditional), numpy (conditional), pkg_resources._vendor.pyparsing (conditional), setuptools._vendor.pyparsing (conditional), py._builtin (conditional), ptyprocess.ptyprocess (optional) missing module named ordereddict - imported by pkg_resources._vendor.pyparsing (optional), setuptools._vendor.pyparsing (optional) missing module named 'org.python' - imported by copy (optional), setuptools.sandbox (conditional), xml.sax (delayed, conditional) missing module named multiprocessing.TimeoutError - imported by multiprocessing (top-level), multiprocessing.pool (top-level) missing module named multiprocessing.get_context - imported by multiprocessing (top-level), multiprocessing.pool (top-level), multiprocessing.managers (top-level), multiprocessing.sharedctypes (top-level) missing module named multiprocessing.set_start_method - imported by multiprocessing (top-level), multiprocessing.spawn (top-level) missing module named multiprocessing.get_start_method - imported by multiprocessing (top-level), multiprocessing.spawn (top-level) missing module named 'java.lang' - imported by platform (delayed, optional), xml.sax._exceptions (conditional) missing module named multiprocessing.BufferTooShort - imported by multiprocessing (top-level), multiprocessing.connection (top-level) missing module named multiprocessing.AuthenticationError - imported by multiprocessing (top-level), multiprocessing.connection (top-level) missing module named _overlapped - imported by asyncio.windows_events (top-level) missing module named asyncio.DefaultEventLoopPolicy - imported by asyncio (delayed, conditional), asyncio.events (delayed, conditional) missing module named win32evtlog - imported by logging.handlers (delayed, optional) missing module named win32evtlogutil - imported by logging.handlers (delayed, optional) missing module named pkg_resources.extern.packaging - imported by pkg_resources.extern (top-level), pkg_resources (top-level) missing module named pkg_resources.extern.appdirs - imported by pkg_resources.extern (top-level), pkg_resources (top-level) missing module named 'pkg_resources.extern.six.moves' - imported by pkg_resources (top-level), pkg_resources._vendor.packaging.requirements (top-level) missing module named pkg_resources.extern.six - imported by pkg_resources.extern (top-level), pkg_resources (top-level), pkg_resources.py31compat (top-level) missing module named vms_lib - imported by platform (delayed, conditional, optional) missing module named java - imported by platform (delayed) missing module named 'multiprocessing.forking' - imported by /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/PyInstalleloaderthooks/pyi_rth_multiprocessing.py (optional) missing module named org - imported by pickle (optional) missing module named copy_reg - imported by cStringIO (top-level), numpy.core (conditional), pygame (conditional) missing module named 'pygame._view' - imported by pygame (delayed) missing module named OpenGL - imported by pygame (delayed) missing module named numpy.uint32 - imported by numpy (top-level), pygame._numpysurfarray (top-level) missing module named commands - imported by numpy.distutils.cpuinfo (conditional) missing module named setuptools.extern.packaging - imported by setuptools.extern (top-level), setuptools.dist (top-level), setuptools.command.egg_info (top-level) missing module named 'setuptools.extern.six' - imported by setuptools (top-level), setuptools.extension (top-level) missing module named 'setuptools.extern.packaging.specifiers' - imported by setuptools.config (top-level) missing module named 'setuptools.extern.packaging.version' - imported by setuptools.config (top-level), setuptools.msvc (top-level) missing module named setuptools.extern.six.moves.filterfalse - imported by setuptools.extern.six.moves (top-level), setuptools.dist (top-level), setuptools.msvc (top-level) missing module named setuptools.extern.six.moves.filter - imported by setuptools.extern.six.moves (top-level), setuptools.dist (top-level), setuptools.ssl_support (top-level), setuptools.command.py36compat (top-level) missing module named setuptools.extern.ordered_set - imported by setuptools.extern (top-level), setuptools.dist (top-level), setuptools.command.sdist (top-level) missing module named 'setuptools.extern.packaging.utils' - imported by setuptools.wheel (top-level) missing module named 'setuptools.extern.packaging.tags' - imported by setuptools.wheel (top-level) missing module named wincertstore - imported by setuptools.ssl_support (delayed, optional) missing module named 'backports.ssl_match_hostname' - imported by setuptools.ssl_support (optional) missing module named backports - imported by setuptools.ssl_support (optional) missing module named 'setuptools._vendor.six.moves' - imported by 'setuptools._vendor.six.moves' (top-level) missing module named 'setuptools.extern.pyparsing' - imported by setuptools._vendor.packaging.requirements (top-level), setuptools._vendor.packaging.markers (top-level) missing module named setuptools.extern.six.moves.winreg - imported by setuptools.extern.six.moves (conditional), setuptools.msvc (conditional) missing module named setuptools.extern.six.moves.map - imported by setuptools.extern.six.moves (top-level), setuptools.dist (top-level), setuptools.command.easy_install (top-level), setuptools.sandbox (top-level), setuptools.package_index (top-level), setuptools.ssl_support (top-level), setuptools.command.egg_info (top-level), setuptools.namespaces (top-level) runtime module named setuptools.extern.six.moves - imported by setuptools.dist (top-level), configparser (top-level), setuptools.command.easy_install (top-level), setuptools.sandbox (top-level), setuptools.command.setopt (top-level), setuptools.package_index (top-level), setuptools.ssl_support (top-level), setuptools.py33compat (top-level), setuptools.command.egg_info (top-level), setuptools.command.py36compat (top-level), setuptools.namespaces (top-level), setuptools.msvc (top-level), 'setuptools._vendor.six.moves' (top-level) missing module named setuptools.extern.six - imported by setuptools.extern (top-level), setuptools.monkey (top-level), setuptools.dist (top-level), setuptools.extern.six.moves (top-level), setuptools.config (top-level), setuptools.command.easy_install (top-level), setuptools.sandbox (top-level), setuptools.py27compat (top-level), setuptools.package_index (top-level), setuptools.py33compat (top-level), setuptools.wheel (top-level), setuptools.command.egg_info (top-level), setuptools.command.sdist (top-level), setuptools.command.bdist_egg (top-level), setuptools.unicode_utils (top-level), setuptools.installer (top-level), setuptools.command.develop (top-level) missing module named 'numpy_distutils.cpuinfo' - imported by numpy.f2py.diagnose (delayed, conditional, optional) missing module named 'numpy_distutils.fcompiler' - imported by numpy.f2py.diagnose (delayed, conditional, optional) missing module named 'numpy_distutils.command' - imported by numpy.f2py.diagnose (delayed, conditional, optional) missing module named numpy_distutils - imported by numpy.f2py.diagnose (delayed, optional) missing module named __svn_version__ - imported by numpy.f2py.__version__ (optional) missing module named numarray - imported by numpy.distutils.system_info (delayed, conditional, optional) missing module named Numeric - imported by numpy.distutils.system_info (delayed, conditional, optional) missing module named ConfigParser - imported by numpy.distutils.system_info (conditional), numpy.distutils.npy_pkg_config (conditional) missing module named win32con - imported by distutils.msvccompiler (optional) missing module named _dummy_threading - imported by dummy_threading (optional) missing module named twisted - imported by _pytest.unittest (delayed) missing module named zope - imported by _pytest.unittest (delayed) missing module named py.process - imported by py (top-level), py._path.svnurl (top-level) missing module named py.path - imported by py (top-level), py._path.svnurl (top-level), _pytest.doctest (top-level) missing module named apipkg - imported by py (optional) missing module named UserDict - imported by attr._compat (conditional) missing module named chardet - imported by pygments.lexer (delayed, conditional, optional) missing module named ctags - imported by pygments.formatters.html (optional) missing module named PIL - imported by pygments.formatters.img (optional) missing module named 'py.io' - imported by _pytest._io (top-level) missing module named importlib_metadata - imported by pluggy.manager (conditional), _pytest.compat (conditional) missing module named typing_extensions - imported by _pytest.outcomes (conditional), _pytest._code.code (conditional), _pytest._code.source (conditional), _pytest.config.argparsing (conditional), _pytest.runner (conditional), _pytest.main (conditional), _pytest.capture (conditional) missing module named pathlib2 - imported by _pytest.pathlib (conditional) missing module named colorama - imported by py._io.terminalwriter (conditional, optional), _pytest.capture (delayed, conditional, optional) missing module named atomicwrites - imported by _pytest.assertion.rewrite (conditional) missing module named argcomplete - imported by _pytest._argcomplete (conditional, optional) missing module named 'py.builtin' - imported by py._io.terminalwriter (top-level) missing module named compiler - imported by py._code._assertionold (top-level) missing module named 'nose.plugins' - imported by numpy.testing._private.noseclasses (top-level), numpy.testing._private.nosetester (delayed) missing module named scipy - imported by numpy.testing._private.nosetester (delayed, conditional) missing module named 'nose.util' - imported by numpy.testing._private.noseclasses (top-level) missing module named nose - imported by numpy.testing._private.utils (delayed, optional), numpy.testing._private.decorators (delayed), numpy.testing._private.noseclasses (top-level) missing module named psutil - imported by numpy.testing._private.utils (delayed, optional) missing module named numpy.core.number - imported by numpy.core (delayed), numpy.testing._private.utils (delayed) missing module named numpy.core.object_ - imported by numpy.core (top-level), numpy.linalg.linalg (top-level), numpy.testing._private.utils (delayed) missing module named numpy.core.signbit - imported by numpy.core (delayed), numpy.testing._private.utils (delayed) missing module named win32pdh - imported by numpy.testing._private.utils (delayed, conditional) missing module named numpy.core.float32 - imported by numpy.core (top-level), numpy.testing._private.utils (top-level) missing module named numpy.core.intp - imported by numpy.core (top-level), numpy.testing._private.utils (top-level), numpy.linalg.linalg (top-level) missing module named numpy.lib.i0 - imported by numpy.lib (top-level), numpy.dual (top-level) missing module named dummy_thread - imported by numpy.core.arrayprint (conditional, optional) missing module named thread - imported by numpy.core.arrayprint (conditional, optional) missing module named cpickle - imported by numpy.compat.py3k (conditional) missing module named pickle5 - imported by numpy.compat.py3k (conditional, optional) missing module named numpy.core.integer - imported by numpy.core (top-level), numpy.fft.helper (top-level) missing module named numpy.core.sqrt - imported by numpy.core (top-level), numpy.linalg.linalg (top-level), numpy.fft._pocketfft (top-level) missing module named numpy.core.conjugate - imported by numpy.core (top-level), numpy.fft._pocketfft (top-level) missing module named numpy.core.sign - imported by numpy.core (top-level), numpy.linalg.linalg (top-level) missing module named numpy.core.divide - imported by numpy.core (top-level), numpy.linalg.linalg (top-level) missing module named numpy.core.geterrobj - imported by numpy.core (top-level), numpy.linalg.linalg (top-level) missing module named numpy.core.add - imported by numpy.core (top-level), numpy.linalg.linalg (top-level) missing module named numpy.core.complexfloating - imported by numpy.core (top-level), numpy.linalg.linalg (top-level) missing module named numpy.core.inexact - imported by numpy.core (top-level), numpy.linalg.linalg (top-level) missing module named numpy.core.cdouble - imported by numpy.core (top-level), numpy.linalg.linalg (top-level) missing module named numpy.core.csingle - imported by numpy.core (top-level), numpy.linalg.linalg (top-level) missing module named numpy.core.double - imported by numpy.core (top-level), numpy.linalg.linalg (top-level) missing module named numpy.core.single - imported by numpy.core (top-level), numpy.linalg.linalg (top-level) missing module named future_builtins - imported by numpy.lib.npyio (conditional) missing module named urllib2 - imported by numpy.lib._datasource (delayed, conditional) missing module named urlparse - imported by numpy.lib._datasource (delayed, conditional) missing module named numpy.recarray - imported by numpy (top-level), numpy.ma.mrecords (top-level) missing module named numpy.dtype - imported by numpy (top-level), numpy.ma.mrecords (top-level), numpy.ctypeslib (top-level) missing module named numpy.expand_dims - imported by numpy (top-level), numpy.ma.core (top-level) missing module named numpy.array - imported by numpy (top-level), numpy.ma.core (top-level), numpy.ma.extras (top-level), numpy.ma.mrecords (top-level), numpy.ctypeslib (top-level), pygame._numpysurfarray (top-level) missing module named numpy.bool_ - imported by numpy (top-level), numpy.ma.core (top-level), numpy.ma.mrecords (top-level) missing module named numpy.iscomplexobj - imported by numpy (top-level), numpy.ma.core (top-level) missing module named numpy.amin - imported by numpy (top-level), numpy.ma.core (top-level) missing module named numpy.amax - imported by numpy (top-level), numpy.ma.core (top-level) missing module named numpy.ndarray - imported by numpy (top-level), numpy.ma.core (top-level), numpy.ma.extras (top-level), numpy.ma.mrecords (top-level), numpy.ctypeslib (top-level), pygame._numpysurfarray (top-level) missing module named numpy.histogramdd - imported by numpy (delayed), numpy.lib.twodim_base (delayed) missing module named numpy.eye - imported by numpy (delayed), numpy.core.numeric (delayed) missing module named 'pygame.scrap' - imported by pygame (optional) missing module named 'pygame.movie' - imported by pygame (optional) missing module named 'pygame.overlay' - imported by pygame (optional) missing module named Queue - imported by pygame.threads (conditional) missing module named Py25Queue - imported by pygame.threads (conditional) missing module named 'pygame.cdrom' - imported by pygame (conditional, optional) missing module named cStringIO - imported by pygame.compat (conditional)
| | I am trying to import an HTML table from an html file into Python for further processing. I originally tried the PANDAS read_html option at first but received many NaN entries as well as the fact that it did not seem to import all of the data from the HTML table. I also tried using StringIO to read in the entire html file, then I used read_html read that stream with the same results. I am not sure if the issue is because there are some '$' characters in the text indicating cost, the blank are throwing it off, or that some entries have multiple | for notes in the notes column of the source file. The application that outputs this HTML file gives it an XLS extension. | I'd like to see if someone might be able to point me in the right direction to clean up the NaN entries as well as figure out why it seems that some of the data missing. If this info is saved to an Excel file from Python, all I get are header columns that are called Unnamed1-Unnamed13. Thanks! Here is my code: import pandas as pd #from pandas import ExcelWriter #from pandas import ExcelFile import numpy as np import os #import io File = "results.xls" if os.path.isfile(File): with open(File, 'r') as f: dfFile = pd.read_html(File, header=2, na_values=['N/A']) else: print(File + " not found.") print(dfFile)Which produces the output in the Python Shell: https://preview.redd.it/7m1r5y00s2h11.png?width=789&format=png&auto=webp&s=c9584e64fc14d81267a9b3fac9694e4a3fec7289 Here is my HTML input:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
This file lists modules PyInstaller was not able to find. This does not necessarily mean this module is required for running you program. Python and Python 3rd-party packages include a lot of conditional or optional module. For example the module 'ntpath' only exists on Windows, whereas the module 'posixpath' only exists on Posix systems. Types if import: * top-level: imported at the top-level - look at these first * conditional: imported within an if-statement * delayed: imported from within a function * optional: imported within a try-except-statement IMPORTANT: Do NOT post this list to the issue-tracker. Use it as a basis for yourself tracking down the missing module. Thanks! missing module named resource - imported by posix (top-level), C:\Users\tmand\Downloads\poop\test2.py (top-level) missing module named posix - imported by os (conditional, optional), C:\Users\tmand\Downloads\poop\test2.py (top-level) missing module named _posixsubprocess - imported by subprocess (conditional), C:\Users\tmand\Downloads\poop\test2.py (top-level) missing module named org - imported by pickle (optional), C:\Users\tmand\Downloads\poop\test2.py (top-level) missing module named readline - imported by cmd (delayed, conditional, optional), code (delayed, conditional, optional), pdb (delayed, optional), C:\Users\tmand\Downloads\poop\test2.py (top-level) excluded module named _frozen_importlib - imported by importlib (optional), importlib.abc (optional), C:\Users\tmand\Downloads\poop\test2.py (top-level) missing module named _frozen_importlib_external - imported by importlib._bootstrap (delayed), importlib (optional), importlib.abc (optional), C:\Users\tmand\Downloads\poop\test2.py (top-level) missing module named _winreg - imported by platform (delayed, optional), requests.utils (delayed, conditional, optional), C:\Users\tmand\Downloads\poop\test2.py (top-level) missing module named _scproxy - imported by urllib.request (conditional) missing module named java - imported by platform (delayed), C:\Users\tmand\Downloads\poop\test2.py (top-level) missing module named 'java.lang' - imported by platform (delayed, optional), C:\Users\tmand\Downloads\poop\test2.py (top-level), xml.sax._exceptions (conditional) missing module named vms_lib - imported by platform (delayed, conditional, optional), C:\Users\tmand\Downloads\poop\test2.py (top-level) missing module named termios - imported by tty (top-level), getpass (optional), C:\Users\tmand\Downloads\poop\test2.py (top-level) missing module named urllib.getproxies_environment - imported by urllib (conditional), requests.compat (conditional) missing module named urllib.proxy_bypass_environment - imported by urllib (conditional), requests.compat (conditional) missing module named urllib.proxy_bypass - imported by urllib (conditional), requests.compat (conditional) missing module named urllib.getproxies - imported by urllib (conditional), requests.compat (conditional) missing module named urllib.urlencode - imported by urllib (conditional), requests.compat (conditional) missing module named urllib.unquote_plus - imported by urllib (conditional), requests.compat (conditional) missing module named urllib.quote_plus - imported by urllib (conditional), requests.compat (conditional) missing module named urllib.unquote - imported by urllib (conditional), requests.compat (conditional) missing module named urllib.quote - imported by urllib (conditional), requests.compat (conditional) missing module named grp - imported by shutil (optional), tarfile (optional), C:\Users\tmand\Downloads\poop\test2.py (top-level) missing module named 'org.python' - imported by copy (optional), C:\Users\tmand\Downloads\poop\test2.py (top-level), xml.sax (delayed, conditional) missing module named pwd - imported by posixpath (delayed, conditional), shutil (optional), tarfile (optional), http.server (delayed, optional), webbrowser (delayed), netrc (delayed, conditional), getpass (delayed), C:\Users\tmand\Downloads\poop\test2.py (top-level) missing module named _dummy_threading - imported by dummy_threading (optional), C:\Users\tmand\Downloads\poop\test2.py (top-level) missing module named iconv_codec - imported by bs4.dammit (optional) missing module named cchardet - imported by bs4.dammit (optional) missing module named 'html5lib.treebuilders' - imported by bs4.builder._html5lib (optional) missing module named 'html5lib.constants' - imported by bs4.builder._html5lib (top-level) missing module named html5lib - imported by bs4.builder._html5lib (top-level) runtime module named urllib3.packages.six.moves - imported by http.client (top-level), urllib3.connectionpool (top-level), urllib3.util.response (top-level), 'urllib3.packages.six.moves.urllib' (top-level), urllib3.response (top-level), urllib3.util.queue (top-level) missing module named 'OpenSSL.crypto' - imported by urllib3.contrib.pyopenssl (delayed) missing module named 'cryptography.x509' - imported by urllib3.contrib.pyopenssl (delayed, optional) missing module named 'cryptography.hazmat' - imported by urllib3.contrib.pyopenssl (top-level) missing module named cryptography - imported by urllib3.contrib.pyopenssl (top-level), requests (optional) missing module named OpenSSL - imported by urllib3.contrib.pyopenssl (top-level) missing module named StringIO - imported by urllib3.packages.six (conditional), requests.compat (conditional) missing module named 'backports.ssl_match_hostname' - imported by urllib3.packages.ssl_match_hostname (optional) missing module named "'urllib3.packages.six.moves.urllib'.parse" - imported by urllib3.request (top-level), urllib3.poolmanager (top-level) missing module named Queue - imported by urllib3.util.queue (conditional) missing module named Cookie - imported by requests.compat (conditional) missing module named cookielib - imported by requests.compat (conditional) missing module named urllib2 - imported by requests.compat (conditional) missing module named urlparse - imported by praw.const (conditional), requests.compat (conditional), prawcore.exceptions (conditional) missing module named simplejson - imported by requests.compat (optional) missing module named socks - imported by urllib3.contrib.socks (optional) missing module named ConfigParser - imported by praw.const (conditional)
# coding: utf-8 # # Object Detection Demo # Welcome to the object detection inference walkthrough! This notebook will walk you step by step through the process of using a pre-trained model to detect objects in an image. Make sure to follow the [installation instructions](https://github.com/tensorflow/models/blob/masteresearch/object_detection/g3doc/installation.md) before you start. # # Imports # In[ ]: import matplotlib matplotlib.use('Agg') import numpy as np import os import six.moves.urllib as urllib import sys import tarfile import tensorflow as tf import zipfile from collections import defaultdict from io import StringIO from matplotlib import pyplot as plt from PIL import Image # This is needed since the notebook is stored in the object_detection folder. sys.path.append("..") from object_detection.utils import ops as utils_ops import cv2 cap = cv2.VideoCapture("video.mp4") # ## Object detection imports # Here are the imports from the object detection module. # In[ ]: from utils import label_map_util from utils import visualization_utils as vis_util config_tf = tf.ConfigProto() config_tf.gpu_options.per_process_gpu_memory_fraction = 0.4 #config_tf.gpu_options.visible_device_list= '1' config_tf = tf.Session(config=config_tf) # # Model preparation # ## Variables # # Any model exported using the `export_inference_graph.py` tool can be loaded here simply by changing `PATH_TO_CKPT` to point to a new .pb file. # # By default we use an "SSD with Mobilenet" model here. See the [detection model zoo](https://github.com/tensorflow/models/blob/masteresearch/object_detection/g3doc/detection_model_zoo.md) for a list of other models that can be run out-of-the-box with varying speeds and accuracies. # In[ ]: # What model to download. MODEL_NAME = 'ssd_mobilenet_v1_coco_2017_11_17' MODEL_FILE = MODEL_NAME + '.tar.gz' DOWNLOAD_BASE = 'http://download.tensorflow.org/models/object_detection/' # Path to frozen detection graph. This is the actual model that is used for the object detection. PATH_TO_CKPT = MODEL_NAME + '/frozen_inference_graph.pb' # List of the strings that is used to add correct label for each box. PATH_TO_LABELS = os.path.join('data', 'mscoco_label_map.pbtxt') NUM_CLASSES = 90 # ## Download Model # In[ ]: opener = urllib.request.URLopener() opener.retrieve(DOWNLOAD_BASE + MODEL_FILE, MODEL_FILE) tar_file = tarfile.open(MODEL_FILE) for file in tar_file.getmembers(): file_name = os.path.basename(file.name) if 'frozen_inference_graph.pb' in file_name: tar_file.extract(file, os.getcwd()) # ## Load a (frozen) Tensorflow model into memory. # In[ ]: detection_graph = tf.Graph() with detection_graph.as_default(): od_graph_def = tf.GraphDef() with tf.gfile.GFile(PATH_TO_CKPT, 'rb') as fid: serialized_graph = fid.read() od_graph_def.ParseFromString(serialized_graph) tf.import_graph_def(od_graph_def, name='') # ## Loading label map # Label maps map indices to category names, so that when our convolution network predicts `5`, we know that this corresponds to `airplane`. Here we use internal utility functions, but anything that returns a dictionary mapping integers to appropriate string labels would be fine # In[ ]: label_map = label_map_util.load_labelmap(PATH_TO_LABELS) categories = label_map_util.convert_label_map_to_categories(label_map, max_num_classes=NUM_CLASSES, use_display_name=True) category_index = label_map_util.create_category_index(categories) # ## Helper code # In[ ]: def load_image_into_numpy_array(image): (im_width, im_height) = image.size return np.array(image.getdata()).reshape( (im_height, im_width, 3)).astype(np.uint8) # # Detection # In[ ]: # For the sake of simplicity we will use only 2 images: # image1.jpg # image2.jpg # If you want to test the code with your images, just add path to the images to the TEST_IMAGE_PATHS. PATH_TO_TEST_IMAGES_DIR = 'test_images' TEST_IMAGE_PATHS = [ os.path.join(PATH_TO_TEST_IMAGES_DIR, 'image{}.jpg'.format(i)) for i in range(1, 3) ] # Size, in inches, of the output images. IMAGE_SIZE = (12, 8) # In[ ]: def run_inference_for_single_image(image, graph): # Get handles to input and output tensors ops = tf.get_default_graph().get_operations() all_tensor_names = {output.name for op in ops for output in op.outputs} tensor_dict = {} for key in [ 'num_detections', 'detection_boxes', 'detection_scores', 'detection_classes', 'detection_masks' ]: tensor_name = key + ':0' if tensor_name in all_tensor_names: tensor_dict[key] = tf.get_default_graph().get_tensor_by_name( tensor_name) if 'detection_masks' in tensor_dict: # The following processing is only for single image detection_boxes = tf.squeeze(tensor_dict['detection_boxes'], [0]) detection_masks = tf.squeeze(tensor_dict['detection_masks'], [0]) # Reframe is required to translate mask from box coordinates to image coordinates and fit the image size. real_num_detection = tf.cast(tensor_dict['num_detections'][0], tf.int32) detection_boxes = tf.slice(detection_boxes, [0, 0], [real_num_detection, -1]) detection_masks = tf.slice(detection_masks, [0, 0, 0], [real_num_detection, -1, -1]) detection_masks_reframed = utils_ops.reframe_box_masks_to_image_masks( detection_masks, detection_boxes, image.shape[0], image.shape[1]) detection_masks_reframed = tf.cast( tf.greater(detection_masks_reframed, 0.5), tf.uint8) # Follow the convention by adding back the batch dimension tensor_dict['detection_masks'] = tf.expand_dims( detection_masks_reframed, 0) image_tensor = tf.get_default_graph().get_tensor_by_name('image_tensor:0') # Run inference output_dict = sess.run(tensor_dict, feed_dict={image_tensor: np.expand_dims(image, 0)}) # all outputs are float32 numpy arrays, so convert types as appropriate output_dict['num_detections'] = int(output_dict['num_detections'][0]) output_dict['detection_classes'] = output_dict[ 'detection_classes'][0].astype(np.uint8) output_dict['detection_boxes'] = output_dict['detection_boxes'][0] output_dict['detection_scores'] = output_dict['detection_scores'][0] if 'detection_masks' in output_dict: output_dict['detection_masks'] = output_dict['detection_masks'][0] return output_dict # In[ ]: with detection_graph.as_default(): config = tf.ConfigProto() config.gpu_options.allow_growth = True sess = tf.Session(config=config) #sess = tf.Session(config=config) with tf.Session() as sess: sess = tf.Session(config=tf.ConfigProto(log_device_placement=True)) print(sess) while (True): ret,image_np = cap.read() # Expand dimensions since the model expects images to have shape: [1, None, None, 3] ## image_np_expanded = np.expand_dims(image_np, axis=0) # Actual detection. output_dict = run_inference_for_single_image(image_np, detection_graph) # Visualization of the results of a detection. vis_util.visualize_boxes_and_labels_on_image_array( image_np, output_dict['detection_boxes'], output_dict['detection_classes'], output_dict['detection_scores'], category_index, instance_masks=output_dict.get('detection_masks'), use_normalized_coordinates=True, line_thickness=8) #cap.set(cv2.CAP_PROP_FPS, 120) device_name = tf.test.gpu_device_name() print('Found GPU at: {}'.format(device_name)) cv2.imshow('object detection', cv2.resize(image_np,(800,600))) if cv2.waitKey(1) & 0xFF == ord('q'): break cap.release() cv2.destroyAllWindows() #cap.release() #cap.destroyAllWindows() fog (1.36.0) fog-aliyun (>= 0.1.0) fog-atmos fog-aws (>= 0.6.0) fog-brightbox (~> 0.4) fog-core (~> 1.32) fog-dynect (~> 0.0.2) fog-ecloud (~> 0.1) fog-google (<= 0.1.0) fog-json fog-local fog-powerdns (>= 0.1.1) fog-profitbricks fog-radosgw (>= 0.0.2) fog-riakcs fog-sakuracloud (>= 0.0.4) fog-serverlove fog-softlayer fog-storm_on_demand fog-terremark fog-vmfusion fog-voxel fog-xenserver fog-xml (~> 0.1.1)Update: This point is somewhat refuted. Fog can be loaded with the Rackspace adapter alone. Use "fog-rackspace" instead of "fog" in Gemfile. However, Rackspace remains slooooow for non-read operations.
FileService.put(folder: "myawesomeapp/invoices", tempfile_with_invoice, filename: "invoice_1234.pdf", public: true) wrapper_object = FileService.get("myawesomeapp/invoices/invoice_1234.pdf") wrapper_object.methods => [:base64string, :stringio, :tempfile, :binary_string, :maybe_some_shorthand_to_save_the_file_locally] I must confess that I have not bothered to explore the vast amount of options that Fog seems to support, so out of laziness, please share your preferences and why you prefer them.
Chris http://www.blogger.com/profile/14816564331088904612 [email protected] Blogger 50 1 25 tag:blogger.com,1999:blog-8306532642573367328.post-7655569332344891001 ... Jennifer http://www.blogger.com/profile/12633388043275906901 [email protected] Blogger 150 1 25 tag:blogger.com,1999:blog-4932024864853918473.post ... StringIO however, is a native in-memory unicode container and will exhibit similar speed t o BytesIO.16 2 4 3 Multi-threading. FileIO objects are thread-safe to the extent that the operating system calls such as read 2 under Unix they wrap are thread-safe too.
[index] [7329] [2381] [7249] [7454] [2759] [2858] [6885] [2480] [1843] [1113]