Binära alternativsignaler Falkenberg

I have a big problem with Pyinstaller

I don't know what happened, but one day my pyinstaller worked and the other, all exe files made with it are broken. It is giving some errors during the creation of the files as well. It seems like a lot of modules are missing. Anyone know how to fix it?
Here is the error file:
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) 
submitted by Spiredlamb to learnpython [link] [comments]

Error loading Python lib

The name of my python script is kled.py
This is the message I used to create it:
pyinstaller kled.py --windowed 
Here 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' 

When I double click the application it has created it appears to open in my dock, and then goes away, nothing actually opens.

Here are the resources I've already looked at but didn't find success from:
https://github.com/pyinstallepyinstalleissues/2150
- I don't understand the solution they found. The two people troubleshooting didn't explain the steps they were taking so I couldn't follow.
https://github.com/pyinstallepyinstalleissues/3499
- This is where I got the idea to change my spec files, because in his pyinstaller command it seems like he has a specific spec file he was trying to use.
https://pyinstaller.readthedocs.io/en/stable/spec-files.html
- I thought maybe I could edit my spec file to include the modules or python version it might be missing, but no other results told me how to properly set up my spec file to do this. I was originally trying to use py2app and if any of you know it, you will know that setup.py basically lets you hand pick all the files and stuff you need. Unfortunately py2app has a huge amount of issues in general so I decided my error wasn't going to get fixed, but pyinstaller seems to have some experts so maybe you guys can help.
https://stackoverflow.com/questions/60678697/error-loading-python-lib-with-pyinstaller-on-macos
- went through the steps and it just didn't work for me. Same outcome where the application doesn't work and the executable terminal file called kled says that it had an Error loading python lib.

RESOURCES YOU MIGHT NEED (idk I'm just guessing but here is some stuff)
my kled.spec file:
# -*- 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) 

Python version:
Python 3.8.2

Modules I am trying to use:
pygame time random sys os pickle

MacOS version:
macOS Catalina
Version 10.15.4

My warn-kled.txt file:
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) 
submitted by savoiry1 to u/savoiry1 [link] [comments]

Importing HTML tables using PANDAS

are throwing it off, or that some entries have multiple
Importing HTML tables using PANDAS
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
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:
    

Note: All Prices and Availability Subject to Change.8/10/2018 6:37:28 PM

Requested Part Unit Price Price Breaks? Item Description Requested Qty Unit Warehouse Qty Available Date Next In Qty Due In Notes
CR3222-4-5 $0.00 N 0 0 0 This part number is not recognized in Proponent system.
CR3222-4-6 $1.30 N CR MAX RIVE 800 EA Tamarac, FL 3533 0 Minimum order quantity for this part is 100 EA This part is sold in 100 EA increments only Available with 10 days lead time. Non-cancellable/Non-returnable
CR3222-4-7 $0.00 N 0 0 0 This part number is not recognized in Proponent system.
CR3222-4-8 $0.00 N 0 0 0 This part number is not recognized in Proponent system.
CR3222-6-2 $0.00 N 0 0 0 This part number is not recognized in Proponent system.
CR3222-6-3 $0.00 N 0 0 0 This part number is not recognized in Proponent system.
CR3222-6-4 $1.45 N RIVET 500 EA Tamarac, FL 0 0 Minimum order quantity for this part is 100 EA This part is sold in 100 EA increments only Non-cancellable/Non-returnable Out of stock. Lead time is 24 calendar days
CR3522-4-2 $1.53 N CR MAX RIVE 2000 EA Tamarac, FL 0 0 Minimum order quantity for this part is 100 EA This part is sold in 100 EA increments only Non-cancellable/Non-returnable Out of stock. Lead time is 126 calendar days
submitted by ToadCode to Python [link] [comments]

PRAW missing modules (Pyinstaller)

Attached is my code. Im trying to use pyinstaller with the PRAW api, but im getting errors that im missing modules? I read there is a solution to direct the pyinstaller to the path but im unsure on how to do so.
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) 

submitted by TmanD6 to learnpython [link] [comments]

creating Python exe

Hello I'm trying to create an exe out of my python file using pyinstaller. but i get these warnings and i have no idea how to solve it. I'm using anaconda. I should be having atleast pandas and numpy but i still get these errors:
missing module named 'multiprocessing.forking' - imported by c:\users\warda\appdata\local\programs\python\python36-32\lib\site-packages\PyInstaller\loader\rthooks\pyirth_multiprocessing.py missing module named multiprocessing.get_context - imported by multiprocessing, multiprocessing.pool, multiprocessing.managers, multiprocessing.sharedctypes missing module named multiprocessing.TimeoutError - imported by multiprocessing, multiprocessing.pool missing module named multiprocessing.BufferTooShort - imported by multiprocessing, multiprocessing.connection missing module named multiprocessing.AuthenticationError - imported by multiprocessing, multiprocessing.connection missing module named multiprocessing.set_start_method - imported by multiprocessing, multiprocessing.spawn missing module named multiprocessing.get_start_method - imported by multiprocessing, multiprocessing.spawn missing module named multiprocessing.SimpleQueue - imported by multiprocessing, concurrent.futures.process missing module named 'win32com.gen_py' - imported by win32com, c:\users\warda\appdata\local\programs\python\python36-32\lib\site-packages\PyInstaller\loader\rthooks\pyi_rth_win32comgenpy.py missing module named pyimod03_importers - imported by PyInstaller.loader.pyimod02_archive, c:\users\warda\appdata\local\programs\python\python36-32\lib\site-packages\PyInstaller\loader\rthooks\pyi_rth_pkgres.py missing module named StringIO - imported by pandas.compat, six, numpy.lib.utils, numpy.testing.nose_tools.utils, PyInstaller.lib.modulegraph._compat, PyInstaller.lib.modulegraph.zipio, numpy.lib.format, pkg_resources._vendor.six missing module named 'com.sun' - imported by pkg_resources._vendor.appdirs missing module named com - imported by pkg_resources._vendor.appdirs missing module named 'pkg_resources.extern.pyparsing' - imported by pkg_resources._vendor.packaging.markers, pkg_resources._vendor.packaging.requirements missing module named __builtin_ - imported by pandas.compat, numpy.core.numerictypes, numpy.core.numeric, numpy.distutils.miscutil, numpy.lib.function_base, numpy.lib._iotools, numpy.ma.core, numpy, pyparsing, pkg_resources._vendor.pyparsing missing module named ordereddict - imported by pyparsing, pkg_resources._vendor.pyparsing missing module named _scproxy - imported by urllib.request missing module named 'macholib.compat' - imported by macholib.MachO missing module named _pkgutil - imported by PyInstaller.lib.modulegraph.modulegraph missing module named xdis - imported by PyInstaller.lib.modulegraph._compat missing module named dis3 - imported by PyInstaller.lib.modulegraph._compat missing module named urllib.pathname2url - imported by urllib, PyInstaller.lib.modulegraph._compat, pandas.io.common missing module named PyQt5 - imported by PyInstaller.utils.hooks.qt, pandas.io.clipboard missing module named pyimod00_crypto_key - imported by PyInstaller.loader.pyimod02_archive missing module named thread - imported by pandas.compat.chainmap_impl, numpy.core.arrayprint, PyInstaller.loader.pyimod02_archive missing module named Crypto - imported by PyInstaller.building.makespec missing module named 'win32ctypes.pywin32' - imported by PyInstaller.compat missing module named win32ctypes - imported by PyInstaller.compat missing module named UserDict - imported by PyInstaller.compat, pytz.lazy missing module named pkg_resources.extern.packaging - imported by pkg_resources.extern, pkg_resources missing module named pkg_resources.extern.appdirs - imported by pkg_resources.extern, pkg_resources missing module named 'pkg_resources.extern.six.moves' - imported by pkg_resources, pkg_resources._vendor.packaging.requirements missing module named pkg_resources.extern.six - imported by pkg_resources.extern, pkg_resources missing module named resource - imported by posix, C:\Users\warda\Anaconda3\Python Scripts\myfirstprog.py missing module named posix - imported by os, C:\Users\warda\Anaconda3\Python Scripts\myfirstprog.py missing module named _posixsubprocess - imported by subprocess, multiprocessing.util, C:\Users\warda\Anaconda3\Python Scripts\myfirstprog.py missing module named org - imported by pickle, C:\Users\warda\Anaconda3\Python Scripts\myfirstprog.py missing module named readline - imported by cmd, code, pdb, C:\Users\warda\Anaconda3\Python Scripts\myfirstprog.py excluded module named _frozen_importlib - imported by importlib, importlib.abc, PyInstaller.loader.pyimod02_archive, C:\Users\warda\Anaconda3\Python Scripts\myfirstprog.py missing module named _frozen_importlib_external - imported by importlib._bootstrap, importlib, importlib.abc, C:\Users\warda\Anaconda3\Python Scripts\myfirstprog.py missing module named _winreg - imported by platform, numpy.distutils.cpuinfo, C:\Users\warda\Anaconda3\Python Scripts\myfirstprog.py, pkg_resources._vendor.appdirs missing module named java - imported by platform, unittest.mock, C:\Users\warda\Anaconda3\Python Scripts\myfirstprog.py missing module named 'java.lang' - imported by platform, xml.sax._exceptions, C:\Users\warda\Anaconda3\Python Scripts\myfirstprog.py missing module named vms_lib - imported by platform, C:\Users\warda\Anaconda3\Python Scripts\myfirstprog.py missing module named termios - imported by tty, getpass, pandas.io.formats.terminal, C:\Users\warda\Anaconda3\Python Scripts\myfirstprog.py missing module named urllib.urlencode - imported by urllib, pandas.io.common missing module named grp - imported by shutil, tarfile, pathlib, distutils.archive_util, C:\Users\warda\Anaconda3\Python Scripts\myfirstprog.py missing module named pwd - imported by posixpath, shutil, tarfile, http.server, webbrowser, pathlib, distutils.util, distutils.archive_util, netrc, getpass, C:\Users\warda\Anaconda3\Python Scripts\myfirstprog.py missing module named 'org.python' - imported by copy, xml.sax, setuptools.sandbox, C:\Users\warda\Anaconda3\Python Scripts\myfirstprog.py missing module named _dummy_threading - imported by dummy_threading, C:\Users\warda\Anaconda3\Python Scripts\myfirstprog.py missing module named six.moves.xrange - imported by six.moves, matplotlib.cbook, matplotlib.backend_bases, matplotlib.hatch, matplotlib.markers, matplotlib.colorbar, matplotlib.contour, matplotlib.dviread, matplotlib.offsetbox, matplotlib.backends.backend_svg, matplotlib.mlab, matplotlib.tri.triinterpolate, matplotlib.axes._axes, matplotlib.stackplot, matplotlib.streamplot, matplotlib.table, matplotlib.axes._base runtime module named six.moves - imported by dateutil.tz.tz, dateutil.tz.win, dateutil.rrule, matplotlib.cbook, matplotlib.backend_bases, matplotlib.colors, matplotlib.textpath, matplotlib.hatch, matplotlib.afm, matplotlib.font_manager, matplotlib.patches, matplotlib.markers, matplotlib.text, matplotlib.axes._subplots, cycler, matplotlib.colorbar, matplotlib.collections, matplotlib.contour, matplotlib.dviread, matplotlib.offsetbox, 'six.moves.urllib', matplotlib.dates, matplotlib.backends.backend_svg, matplotlib.legend_handler, matplotlib.mlab, matplotlib.tri.triinterpolate, matplotlib.widgets, matplotlib.axes._axes, matplotlib.stackplot, matplotlib.streamplot, matplotlib.table, matplotlib.axes._base, matplotlib, matplotlib.backends.tkagg, matplotlib.backends._backend_tk, matplotlib.backends.backend_ps missing module named six.moves.map - imported by six.moves, matplotlib.afm, matplotlib.patches, matplotlib.axes._subplots, matplotlib.mlab missing module named six.moves.zip - imported by six.moves, matplotlib.cbook, matplotlib.colors, matplotlib.textpath, matplotlib.patches, matplotlib.text, cycler, matplotlib.colorbar, matplotlib.collections, matplotlib.offsetbox, matplotlib.dates, matplotlib.legend_handler, matplotlib.mlab, matplotlib.widgets, matplotlib.axes._axes missing module named six.moves.range - imported by six.moves, dateutil.rrule missing module named numpy.linalg.inv - imported by numpy.linalg, numpy.matrixlib.defmatrix, numpy.lib.polynomial, matplotlib.transforms missing module named dummy_thread - imported by numpy.core.arrayprint missing module named numpy.eye - imported by numpy, numpy.core.numeric missing module named cPickle - imported by pandas.compat, numpy.core.numeric, numpy.lib.format, numpy.lib.npyio, numpy.ma.core missing module named cStringIO - imported by pandas.compat, cPickle missing module named copy_reg - imported by cStringIO, cPickle, numpy.core missing module named numpy.core.number - imported by numpy.core, numpy.testing.nose_tools.utils missing module named numpy.lib.imag - imported by numpy.lib, numpy.testing.nose_tools.utils missing module named numpy.lib.real - imported by numpy.lib, numpy.testing.nose_tools.utils missing module named numpy.lib.iscomplexobj - imported by numpy.lib, numpy.testing.nose_tools.utils missing module named numpy.array - imported by numpy, numpy.ma.core, numpy.ma.extras, numpy.ma.mrecords, numpy.ctypeslib missing module named numpy.recarray - imported by numpy, numpy.ma.mrecords missing module named numpy.ndarray - imported by numpy, numpy.ma.core, numpy.ma.extras, numpy.ma.mrecords, numpy.ctypeslib, pandas.compat.numpy.function missing module named numpy.dtype - imported by numpy, numpy.ma.mrecords, numpy.ctypeslib missing module named numpy.bool - imported by numpy, numpy.ma.core, numpy.ma.mrecords missing module named numpy.expanddims - imported by numpy, numpy.ma.core missing module named numpy.iscomplexobj - imported by numpy, numpy.ma.core missing module named numpy.amin - imported by numpy, numpy.ma.core missing module named numpy.amax - imported by numpy, numpy.ma.core missing module named future_builtins - imported by numpy.lib.npyio missing module named urllib2 - imported by numpy.lib._datasource, pandas.io.common missing module named urlparse - imported by numpy.lib._datasource, pandas.io.common, pandas.io.s3 missing module named numpy.histogramdd - imported by numpy, numpy.lib.twodim_base missing module named numpy.core.integer - imported by numpy.core, numpy.fft.helper missing module named numpy.core.sqrt - imported by numpy.core, numpy.linalg.linalg, numpy.fft.fftpack missing module named numpy.core.conjugate - imported by numpy.core, numpy.fft.fftpack missing module named numpy.lib.i0 - imported by numpy.lib, numpy.dual missing module named numpy.lib.triu - imported by numpy.lib, numpy.linalg.linalg missing module named numpy.core.signbit - imported by numpy.core, numpy.testing.nose_tools.utils missing module named numpy.core.float64 - imported by numpy.core, numpy.testing.nose_tools.utils missing module named nose - imported by numpy.testing.nose_tools.utils, numpy.testing.nose_tools.decorators, numpy.testing.nose_tools.noseclasses missing module named numpy.core.float32 - imported by numpy.core, numpy.testing.nose_tools.utils missing module named numpy.core.divide - 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.intp - 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.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.add - 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.inexact - 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.csingle - 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.single - imported by numpy.core, numpy.linalg.linalg missing module named commands - imported by numpy.distutils.cpuinfo missing module named setuptools.extern.packaging - imported by setuptools.extern, setuptools.dist, setuptools.command.egginfo missing module named 'setuptools.extern.six' - imported by setuptools, setuptools.extension missing module named _manylinux - imported by setuptools.pep425tags missing module named wincertstore - imported by setuptools.ssl_support missing module named 'backports.ssl_match_hostname' - imported by setuptools.ssl_support missing module named 'setuptools.extern.packaging.version' - imported by setuptools.msvc missing module named 'setuptools.extern.six.moves' - imported by setuptools.dist, setuptools.py33compat, 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 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.wheel, 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 ConfigParser - imported by numpy.distutils.system_info, numpy.distutils.npy_pkg_config missing module named _curses - imported by curses, curses.has_key missing module named 'nose.plugins' - imported by numpy.testing.nose_tools.noseclasses, numpy.testing.nose_tools.nosetester missing module named scipy - imported by numpy.testing.nose_tools.nosetester, pandas.core.missing, pandas.plotting._core missing module named 'nose.util' - imported by numpy.testing.nose_tools.noseclasses missing module named numpy.testing.memusage - imported by numpy.testing, numpy.f2py.f2py_testing missing module named numpy.testing.jiffies - imported by numpy.testing, numpy.f2py.f2py_testing missing module named 'IPython.core' - imported by pandas.io.formats.printing, matplotlib.pyplot, pandas.util.testing missing module named IPython - imported by pandas.io.formats.printing, pandas.io.formats.html, matplotlib.pyplot missing module named gobject - imported by matplotlib.pyplot missing module named gi - imported by matplotlib.pyplot missing module named 'PyQt5.QtWidgets' - imported by matplotlib.pyplot, pandas.io.clipboard.clipboards missing module named PyQt4 - imported by matplotlib.pyplot, pandas.io.clipboard missing module named wx - imported by matplotlib.pyplot missing module named 'backports.functools_lru_cache' - imported by matplotlib.fontconfig_pattern, matplotlib.font_manager, matplotlib.dviread missing module named subprocess32 - imported by matplotlib.compat.subprocess missing module named sets - imported by pytz.tzinfo missing module named dateutil.tz.tzfile - imported by dateutil.tz, dateutil.zoneinfo missing module named dateutil.tz.tzlocal - imported by dateutil.tz, dateutil.rrule missing module named dateutil.tz.tzutc - imported by dateutil.tz, dateutil.rrule 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 missing module named PIL - imported by matplotlib.image, matplotlib.backend_bases, matplotlib.backends.backend_agg missing module named "'six.moves.urllib'.parse" - imported by matplotlib.image, matplotlib.textpath missing module named matplotlib.tri.Triangulation - imported by matplotlib.tri, matplotlib.tri.trifinder, matplotlib.tri.tritools, matplotlib.tri.triinterpolate, matplotlib.mlab missing module named 'mpl_toolkits.natgrid' - imported by matplotlib.mlab missing module named matplotlib.axes.Subplot - imported by matplotlib.axes, matplotlib.pyplot, pandas.plotting._core missing module named matplotlib.axes.Axes - imported by matplotlib.axes, matplotlib.legend, matplotlib.pyplot, matplotlib.projections.geo, matplotlib.projections.polar, matplotlib.figure missing module named "'six.moves.urllib'.request" - imported by matplotlib.image, matplotlib missing module named numpy.random.rand - imported by numpy.random, pandas.util.testing missing module named numpy.random.randn - imported by numpy.random, pandas.util.testing missing module named 'IPython.utils' - imported by matplotlib missing module named mock - imported by matplotlib missing module named pytest - imported by matplotlib, pandas.util._tester, pandas.util.testing missing module named s3fs - imported by pandas.io.s3, pandas.io.common missing module named py - imported by pandas.io.common missing module named httplib - imported by pandas.compat, pandas.io.common missing module named qtpy - imported by pandas.io.clipboard.clipboards, pandas.io.clipboard missing module named gtk - imported by pandas.io.clipboard.clipboards, pandas.io.clipboard missing module named 'PyQt4.QtGui' - imported by pandas.io.clipboard.clipboards 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 pandas_gbq - imported by pandas.io.gbq missing module named botocore - imported by pandas.io.s3 missing module named 'scipy.interpolate' - imported by pandas.core.missing missing module named 'scipy.signal' - imported by pandas.core.window missing module named numexpr - imported by pandas.core.computation.check, pandas.core.computation.expressions, pandas.core.computation.engines missing module named fastparquet - imported by pandas.io.parquet missing module named 'pyarrow.parquet' - imported by pandas.io.parquet missing module named pyarrow - imported by pandas.io.parquet missing module named feather - imported by pandas.io.feather_format 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 - imported by pandas.io.excel missing module named xlrd - imported by pandas.io.excel missing module named xlsxwriter - imported by pandas.io.excel missing module named 'scipy.sparse' - imported by pandas.core.sparse.scipy_sparse, pandas.core.sparse.frame, pandas.core.dtypes.common missing module named jinja2 - imported by pandas.io.formats.style missing module named 'scipy.stats' - imported by pandas.core.nanops, pandas.plotting._misc, pandas.plotting._core missing module named bottleneck - imported by pandas.core.nanops missing module named fcntl - imported by pandas.io.formats.terminal missing module named xarray - imported by pandas.core.generic missing module named backports - imported by pandas.compat missing module named pudb - imported by pandas.util.testing missing module named 'lxml.etree' - imported by pandas.io.html missing module named 'lxml.html' - imported by pandas.io.html missing module named html5lib - imported by pandas.io.html missing module named lxml - imported by pandas.io.html missing module named bs4 - imported by pandas.io.html missing module named simplejson - imported by pandas.util._print_versions missing module named pandas.factorize - imported by pandas, pandas.core.util.hashing missing module named pandas.unique - imported by pandas, pandas.core.arrays.base missing module named pandas.option_context - imported by pandas, pandas.io.clipboards missing module named pandas.NaT - imported by pandas, pandas.io.packers missing module named pandas.Period - imported by pandas, pandas.io.packers missing module named pandas.SparseDataFrame - imported by pandas, pandas.io.pytables missing module named pandas.SparseSeries - imported by pandas, pandas.io.pytables missing module named pandas.Int64Index - imported by pandas, pandas.io.feather_format, pandas.io.parquet, pandas.io.pytables, pandas.io.packers, pandas.core.dtypes.concat, pandas.core.algorithms missing module named pandas.RangeIndex - imported by pandas, pandas.io.feather_format, pandas.io.parquet, pandas.io.packers, pandas.core.dtypes.concat, pandas.util.testing missing module named pandas.Interval - imported by pandas, pandas.core.reshape.tile, pandas.io.packers missing module named pandas.Timedelta - imported by pandas, pandas.core.reshape.tile, pandas.core.reshape.merge missing module named pandas.Categorical - imported by pandas, pandas.core.reshape.tile, pandas.core.reshape.merge, pandas.io.packers, pandas.core.dtypes.concat, pandas.core.dtypes.cast, pandas.core.util.hashing, pandas.core.dtypes.common, pandas.util.testing missing module named pandas.concat - imported by pandas, pandas.core.window, pandas.core.groupby.groupby, pandas.core.sparse.frame, pandas.io.pytables, pandas.core.strings missing module named pandas.isna - imported by pandas, pandas.io.json.json, pandas.io.stata, pandas.io.pytables missing module named pandas.CategoricalIndex - imported by pandas, pandas.core.arrays.categorical, pandas.io.packers, pandas.core.dtypes.concat, pandas.util.testing 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.core.reshape.tile, pandas.io.packers missing module named pandas.DateOffset - imported by pandas, pandas.core.indexes.datetimelike missing module named pandas.Panel - imported by pandas, pandas.core.indexing, pandas.io.pytables, pandas.io.packers, pandas.util.testing missing module named pandas.MultiIndex - imported by pandas, pandas.core.reshape.concat, pandas.io.json.json, pandas.core.window, pandas.core.reshape.merge, pandas.io.formats.excel, pandas.core.reshape.pivot, pandas.io.pytables, pandas.io.packers, pandas.core.strings, pandas.core.util.hashing, pandas.util.testing missing module named pandas.DataFrame - imported by pandas, pandas.core.accessor, pandas.core.reshape.concat, pandas.core.indexing, pandas.core.indexes.timedeltas, pandas.io.json.json, pandas.plotting._tools, pandas.plotting._core, pandas.core.indexes.multi, pandas.core.window, pandas.core.reshape.merge, pandas.io.feather_format, pandas.io.parquet, pandas.core.reshape.pivot, pandas.io.json.normalize, pandas.io.json.table_schema, pandas.io.pytables, pandas.io.packers, pandas.io.clipboards, pandas.core.generic, pandas.core.strings, pandas.core.indexes.base, pandas.core.base, pandas.core.tools.datetimes, pandas.util.testing missing module named pandas.Index - imported by pandas, pandas.core.algorithms, pandas.core.accessor, pandas.core.reshape.concat, pandas.core.indexes.datetimelike, pandas.core.arrays.categorical, pandas.compat.pickle_compat, pandas.core.window, pandas.core.reshape.merge, pandas.io.formats.excel, pandas.io.pytables, pandas.io.packers, pandas.core.strings, pandas.core.base, pandas.core.dtypes.concat, pandas.core.sorting, pandas.core.tools.datetimes, pandas.core.util.hashing, pandas.core.dtypes.dtypes, pandas.util.testing missing module named pandas.PeriodIndex - imported by pandas, pandas.core.algorithms, pandas.io.formats.excel, pandas.io.pytables, pandas.io.packers, pandas.util.testing missing module named pandas.DatetimeIndex - imported by pandas, pandas.core.dtypes.cast, pandas.core.algorithms, pandas.core.missing, pandas.core.indexes.datetimelike, pandas.core.indexes.timedeltas, pandas.io.stata, pandas.io.pytables, pandas.io.packers, pandas.core.tools.datetimes, pandas.util.testing missing module named pandas.to_numeric - imported by pandas, pandas.core.dtypes.cast, pandas.core.arrays.categorical, pandas.core.tools.datetimes missing module named pandas.to_timedelta - imported by pandas, pandas.core.dtypes.cast, pandas.core.arrays.categorical, pandas.core.window, pandas.core.groupby.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.core.indexes.datetimes, pandas.io.pytables, pandas.io.packers, pandas.util.testing missing module named pandas.to_datetime - imported by pandas, pandas.core.dtypes.cast, pandas.core.arrays.categorical, pandas.io.json.json, pandas.core.groupby.groupby, pandas.core.reshape.tile, pandas.io.stata, pandas.io.pytables, pandas.core.generic missing module named pandas.Series - imported by pandas, pandas.core.dtypes.missing, pandas.core.tools.timedeltas, pandas.core.algorithms, pandas.core.missing, pandas.core.accessor, pandas.core.reshape.concat, pandas.core.indexing, pandas.io.formats.format, pandas.core.indexes.datetimes, pandas.core.arrays.categorical, pandas.io.json.json, pandas.plotting._core, pandas.core.indexes.multi, pandas.core.window, pandas.core.reshape.tile, pandas.core.apply, pandas.io.pytables, pandas.io.packers, pandas.core.generic, pandas.core.indexes.accessors, pandas.core.strings, pandas.core.indexes.base, pandas.core.base, pandas.core.dtypes.concat, pandas.core.tools.datetimes, pandas.core.util.hashing, pandas.io.html, pandas.util.testing missing module named pandas.IntervalIndex - imported by pandas, pandas.core.dtypes.missing, pandas.core.indexes.category, pandas.core.reshape.tile, pandas.io.packers, pandas.util.testing missing module named pandas.get_option - imported by pandas, pandas.io.formats.console, pandas.io.parquet, pandas.io.clipboards
submitted by SergeantDraw to learnpython [link] [comments]

Tensorflow-gpu use CPU and not GPU

I use tensorflow-gpu in Windows 10, when running the examples that come with object_detection it runs on CPU and not GPU
# 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() 

submitted by magick2 to learnmachinelearning [link] [comments]

Managing binary data in Rails

What are you preferred way of handling binary storage in Rails apps?
I have experience with several solutions that I all dislike in different ways:
From gemfile.lock
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.
My ideal solution would be one that is:
Basically the API should look something like:
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.
submitted by nielsbuus to ruby [link] [comments]

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]

http://forex-portugal.binaryoptionstradingusa.live