cx freeze exe not running (nothing happens) - windows

Windows 7 x64, Python 2.7 (Anaconda distribution), cx_Freeze 5.0
I am having trouble converting my python script to an executable using cx freeze. I can create an exe using the setup file below (with no errors mentioned) although in when building there are lots of missing modules with a “?” next to it – I'm not sure if this is important or not.
Missing modules:
? imported from nbformat.validator
? AppKit imported from matplotlib.backends.backend_cocoaagg
? Carbon imported from plistlib
? Carbon.File imported from plistlib
? Carbon.Files imported from plistlib
? ElementC14N imported from xml.etree.ElementTree
? Foundation imported from matplotlib.backends.backend_cocoaagg
? Gtk.glade imported from matplotlib.backends.backend_gtk3
? IPython.kernel.comm imported from matplotlib.backends.backend_nbagg
? IPython.kernel.zmq.kernelapp imported from IPython
? Image imported from docutils.parsers.rst.directives.images, docutils.writers.html4css1, sphinx.writers.html
? IronPython.Runtime.Exceptions imported from nose.suite
? IronPythonConsole imported from pyreadline.console.ironpython_console
? Levenshtein imported from sphinx.versioning
? MacOS imported from platform
? OpenGL.GLUT imported from IPython.lib.inputhook, IPython.lib.inputhookglut
? OpenGL.platform imported from IPython.lib.inputhookglut
? PyObjCTools imported from matplotlib.backends.backend_cocoaagg
? PyQt5 imported from IPython.external.qt_loaders, matplotlib.backends.qt_compat
? PyQt5.QtCore imported from PIL.ImageQt
? PyQt5.QtGui imported from PIL.ImageQt
? PyQt5.QtWidgets imported from matplotlib.pyplot
? PySide imported from IPython.external.qt_loaders, matplotlib.backends.qt_compat
? PySide.QtCore imported from PIL.ImageQt
? PySide.QtGui imported from PIL.ImageQt
? Pyrex.Compiler.Main imported from numpy.distutils.command.build_src
? Stemmer imported from sphinx.search.en
? System imported from IPython.utils._process_cli, pyreadline.console.ironpython_console, pyreadline.keysyms.ironpython_keysyms, pyreadline.rlmain, traitlets.traitlets
? System.Windows.Forms.Clipboard imported from pyreadline.clipboard.ironpython_clipboard
? __pypy__ imported from jinja2.debug
? _curses imported from curses, curses.has_key
? _datetime imported from future.backports.datetime
? _dummy_threading imported from dummy_threading
? _emx_link imported from os
? _imaging_gif imported from PIL.GifImagePlugin
? _imp imported from pkg_resources
? _scproxy imported from future.backports.urllib.request, urllib
? _sysconfigdata imported from distutils.sysconfig, sysconfig
? _thread.allocate_lock imported from cffi.lock
? _thread.get_ident imported from future.backports.misc, singledispatch_helpers
? _thread.interrupt_main imported from ipykernel.parentpoller
? _winapi imported from ipykernel.parentpoller, jupyter_client.launcher
? appnope imported from IPython.lib.inputhook, ipykernel.eventloops
? asyncio imported from tornado.platform.asyncio
? builtins.bool imported from numpy, numpy.core.numerictypes, numpy.lib._iotools
? builtins.complex imported from numpy, numpy.core.numerictypes, numpy.lib._iotools
? builtins.float imported from numpy, numpy.core.numerictypes, numpy.lib._iotools
? cairo imported from matplotlib.backends.backend_cairo
? cairo.gtk imported from matplotlib.backends.backend_gtkcairo
? cairocffi imported from matplotlib.backends.backend_cairo
? ce imported from os
? certifi imported from requests.certs, tornado.netutil, tornado.simple_httpclient
? cffi._pycparser imported from cffi.cparser
? chardet imported from pygments.lexer, requests.packages
? cloudpickle imported from ipykernel.pickleutil
? clr imported from IPython.utils._process_cli, nose.suite, pyreadline.clipboard.ironpython_clipboard, pyreadline.console.ironpython_console
? code_generators.genapi imported from numpy.core.cversions
? code_generators.numpy_api imported from numpy.core.cversions
? configparser imported from numpy.distutils.npy_pkg_config, numpy.distutils.system_info, setuptools.compat
? console imported from pyreadline.console.ansi
? coverage imported from IPython.testing.iptestcontroller
? coverage.html imported from IPython.testing.iptestcontroller
? ctags imported from pygments.formatters.html
? dbm imported from future.moves.dbm, future.moves.dbm.ndbm, future.standard_library, whichdb
? dbm.dumb imported from future.moves.dbm.dumb
? dbm.gnu imported from future.moves.dbm.gnu
? dbm.ndbm imported from future.moves.dbm.ndbm
? dill imported from ipykernel.pickleutil
? elementtree.ElementTree imported from xlrd.xlsx
? faulthandler imported from matplotlib
? fcntl imported from sphinx.util.console, subprocess, tornado.platform.posix, zmq.eventloop.minitornado.platform.posix
? gdbm imported from future.moves.dbm.gnu
? genapi imported from numpy.core.generate_numpy_api
? gestalt imported from platform
? gi imported from matplotlib.backends.backend_gtk3
? gi.repository imported from IPython.lib.inputhookgtk3, ipykernel.gui.gtk3embed, matplotlib.backends.backend_gtk3, matplotlib.pyplot
? glut_support imported from IPython.lib.inputhook
? gobject imported from IPython.lib.inputhookgtk, ipykernel.gui.gtkembed, matplotlib.backends.backend_gdk, matplotlib.backends.backend_gtk, matplotlib.pyplot
? grp imported from distutils.archive_util, path, shutil, tarfile
? gtk imported from IPython.lib.inputhook, IPython.lib.inputhookgtk, ipykernel.gui.gtkembed, matplotlib.backends.backend_gdk, matplotlib.backends.backend_gtk, matplotlib.backends.backend_gtkcairo
? gtk.glade imported from matplotlib.backends.backend_gtk
? importlib.machinery imported from IPython.core.completerlib, cffi.verifier, pkg_resources
? importlib.reload imported from IPython.core.extensions
? importlib.util imported from IPython.utils.openpy
? ipyparallel imported from ipykernel.zmqshell
? isodate imported from jsonschema._format
? java.lang imported from platform, xml.sax._exceptions
? jinja imported from matplotlib.sphinxext.plot_directive
? jinja2.debugrenderer imported from jinja2.debug
? matplotlib.backends._backend_gdk imported from matplotlib.backends.backend_gdk
? matplotlib.backends._gtkagg imported from matplotlib.backends.backend_gtkagg
? matplotlib.backends._macosx imported from matplotlib.backends.backend_macosx
? matplotlib.externals.six.moves imported from matplotlib, matplotlib.afm, matplotlib.animation, matplotlib.axes._axes, matplotlib.axes._base, matplotlib.axes._subplots, matplotlib.backend_bases, matplotlib.backends.backend_cocoaagg, matplotlib.backends.backend_ps, matplotlib.backends.backend_svg, matplotlib.backends.backend_tkagg, matplotlib.backends.backend_wx, matplotlib.backends.qt_editor.formlayout, matplotlib.backends.tkagg, matplotlib.cbook, matplotlib.collections, matplotlib.colorbar, matplotlib.colors, matplotlib.contour, matplotlib.dates, matplotlib.delaunay.testfuncs, matplotlib.delaunay.triangulate, matplotlib.dviread, matplotlib.finance, matplotlib.font_manager, matplotlib.gridspec, matplotlib.hatch, matplotlib.legend, matplotlib.legend_handler, matplotlib.markers, matplotlib.mlab, matplotlib.offsetbox, matplotlib.patches, matplotlib.sankey, matplotlib.sphinxext.plot_directive, matplotlib.stackplot, matplotlib.streamplot, matplotlib.table, matplotlib.testing.disable_internet, matplotlib.testing.jpl_units.StrConverter, matplotlib.text, matplotlib.textpath, matplotlib.tri.triinterpolate, matplotlib.widgets
? matplotlib.externals.six.moves.urllib.parse imported from matplotlib.image, matplotlib.textpath
? matplotlib.externals.six.moves.urllib.request imported from matplotlib, matplotlib.finance, matplotlib.image
? mklfft.fftpack imported from numpy.fft
? mock imported from matplotlib
? monotime imported from tornado.platform.auto, zmq.eventloop.minitornado.platform.auto
? mpl_toolkits.natgrid imported from matplotlib.mlab
? ndg.httpsclient.ssl_peer_verification imported from requests.packages.urllib3.contrib.pyopenssl
? ndg.httpsclient.subj_alt_name imported from requests.packages.urllib3.contrib.pyopenssl
? netifaces imported from jupyter_client.localinterfaces
? numarray imported from numpy.distutils.system_info
? numpy._build_utils.apple_accelerate imported from numpy.core.setup
? numpy.core.equal imported from numpy.lib.user_array
? numpy.core.float32 imported from numpy.testing.utils
? numpy.core.geterrobj imported from numpy.linalg.linalg
? numpy.core.greater_equal imported from numpy.lib.user_array
? numpy.core.integer imported from numpy.fft.helper
? numpy.core.intp imported from numpy.linalg.linalg
? numpy.core.less_equal imported from numpy.lib.user_array
? numpy.core.longdouble imported from numpy.linalg.linalg
? numpy.core.signbit imported from numpy.testing.utils
? numpy.core.sin imported from numpy.lib.user_array
? numpy.core.subtract imported from numpy.lib.user_array
? numpy_api imported from numpy.core.generate_numpy_api
? numpy_distutils imported from numpy.f2py.diagnose
? numpy_distutils.command.build_flib imported from numpy.f2py.diagnose
? numpy_distutils.command.cpuinfo imported from numpy.f2py.diagnose
? numpy_distutils.cpuinfo imported from numpy.f2py.diagnose
? numpy_distutils.fcompiler imported from numpy.f2py.diagnose
? objc imported from matplotlib.backends.backend_cocoaagg
? ordereddict imported from singledispatch_helpers
? org.python.core imported from copy, pickle, xml.sax
? org.python.modules.posix.PosixModule imported from setuptools.sandbox
? os.path imported from IPython.lib.display, IPython.paths, IPython.testing.iptest, IPython.utils.openpy, cffi.ffiplatform, distutils.file_util, docutils.frontend, docutils.parsers.rst.directives.misc, docutils.utils, docutils.utils.math.math2html, docutils.writers, docutils.writers.html4css1, matplotlib.backends.backend_tkagg, matplotlib.backends.backend_wx, matplotlib.backends.qt_editor.figureoptions, matplotlib.cbook, matplotlib.sphinxext.plot_directive, notebook.nbextensions, notebook.services.config.manager, numpy.core.cversions, numpy.core.memmap, numpy.core.setup, numpy.random.setup, os, pkg_resources, pkgutil, pycparser.ply.lex, pycparser.ply.yacc, pygments.formatters, pygments.formatters.html, pygments.lexers, pygments.regexopt, pytz, pytz.tzfile, requests.adapters, requests.certs, setuptools.utils, shlex, shutil, sysconfig, tornado.template, tornado.web, zmq
? os2 imported from os
? os2emxpath imported from os
? packaging.specifiers imported from pkg_resources
? packaging.version imported from pkg_resources
? pango imported from matplotlib.backends.backend_gdk, matplotlib.backends.backend_gtk
? paramiko imported from zmq.ssh.tunnel
? pathlib imported from PIL.Image
? pexpect imported from IPython.utils._process_posix, zmq.ssh.tunnel
? pkg_resources.iter_entry_points imported from nose.plugins.manager, setuptools.command.egg_info
? pkg_resources.resource_stream imported from pytz
? pkg_resources.resource_string imported from setuptools.command.easy_install
? porterstemmer imported from sphinx.search.en
? posix imported from os
? pretty imported from jinja2.utils
? pwd imported from CGIHTTPServer, distutils.archive_util, distutils.util, docutils.frontend, getpass, netrc, path, posixpath, shutil, tarfile, webbrowser
? pyczmq imported from zmq.sugar.context
? pydb imported from IPython.core.debugger, IPython.core.interactiveshell
? pydb.fns imported from IPython.core.debugger
? pyglet imported from IPython.lib.inputhookpyglet
? pygments.formatters.HtmlFormatter imported from nbconvert.filters.highlight, nbconvert.filters.markdown_mistune, nbconvert.preprocessors.csshtmlheader, sphinx.highlighting
? pygments.formatters.LatexFormatter imported from nbconvert.filters.highlight, nbconvert.preprocessors.latex, sphinx.highlighting
? pygments.lexers.BashLexer imported from IPython.lib.lexers
? pygments.lexers.CLexer imported from sphinx.highlighting
? pygments.lexers.Python3Lexer imported from IPython.lib.lexers
? pygments.lexers.PythonConsoleLexer imported from sphinx.highlighting
? pygments.lexers.PythonLexer imported from IPython.lib.lexers, sphinx.highlighting
? pygments.lexers.RstLexer imported from sphinx.highlighting
? pygments.lexers.TextLexer imported from sphinx.highlighting
? pysqlite2 imported from IPython.core.history
? reprlib.recursive_repr imported from future.backports.misc
? requests.packages.urllib3.packages.six.moves imported from requests.packages.urllib3.response, requests.packages.urllib3.util.response
? resource imported from IPython.utils.timing, profile
? rfc3987 imported from jsonschema._format
? riscos imported from os
? riscosenviron imported from os
? riscospath imported from os
? roman imported from docutils.writers.latex2e, docutils.writers.manpage
? rourl2path imported from urllib
? scipy imported from numpy.testing.nosetester
? setuptools_svn imported from setuptools.command.egg_info
? simplejson imported from requests.compat
? six.moves imported from cycler, dateutil.rrule, dateutil.tzwin, sphinx.application, sphinx.builders.html, sphinx.directives.other, sphinx.environment, sphinx.locale, sphinx.search, sphinx.theming, sphinx.util, sphinx.util.inspect, sphinx.util.jsonimpl, sphinx.util.pycompat, sphinx.versioning, sphinx.writers.texinfo, sphinx.writers.text
? six.moves.urllib.parse imported from sphinx.util
? sphinx.pycode.PycodeError imported from sphinx.ext.autodoc
? startup imported from pyreadline.keysyms.common, pyreadline.keysyms.keysyms
? strict_rfc3339 imported from jsonschema._format
? termios imported from IPython.core.page, getpass, sphinx.util.console, tty
? test imported from future.standard_library
? test.support imported from future.moves.test.support
? test.test_support imported from future.moves.test.support
? testing.udir imported from cffi.recompiler
? tkinter imported from IPython.lib.clipboard, IPython.lib.inputhook, ipykernel.eventloops
? trollius imported from tornado.platform.asyncio
? unittest._WritelnDecorator imported from nose.plugins.multiprocess
? unittest.mock imported from matplotlib
? unittest2.case imported from nose.plugins.skip
? urllib.error imported from numpy.lib._datasource, setuptools.compat
? urllib.parse imported from IPython.core.extensions, IPython.lib.display, jinja2._compat, jsonschema.compat, nbconvert.filters.strings, notebook.nbextensions, notebook.utils, numpy.lib._datasource, pkg_resources, requests.compat, requests.packages.urllib3.poolmanager, requests.packages.urllib3.request, setuptools.compat, tornado.escape, tornado.httputil, tornado.simple_httpclient, tornado.web, tornado.websocket
? urllib.request imported from IPython.core.display, IPython.core.extensions, IPython.core.interactiveshell, IPython.core.magics.code, IPython.utils.openpy, jsonschema.compat, notebook.nbextensions, numpy.lib._datasource, requests.compat, setuptools.compat
? urllib3 imported from requests.packages
? vms_lib imported from platform
? webcolors imported from jsonschema._format
? win32com.gen_py imported from win32com
? wincertstore imported from setuptools.ssl_support
? winreg.CloseKey imported from platform
? winreg.HKEY_LOCAL_MACHINE imported from platform
? winreg.OpenKeyEx imported from platform
? winreg.QueryValueEx imported from platform
? wx imported from IPython.lib.guisupport, IPython.lib.inputhook, IPython.lib.inputhookwx, ipykernel.eventloops, matplotlib.backends.backend_wx, matplotlib.backends.backend_wxagg, matplotlib.backends.wx_compat, matplotlib.pyplot
? zmq.EAGAIN imported from zmq.error
? zmq.ETERM imported from zmq.error, zmq.eventloop.ioloop
? zmq.backend.Context imported from zmq.sugar.context
? zmq.backend.Frame imported from zmq.sugar.frame, zmq.sugar.tracker
? zmq.backend.Socket imported from zmq.sugar.socket
? zmq.backend.constants imported from zmq.sugar.constants
? zmq.backend.strerror imported from zmq.error
? zmq.backend.zmq_errno imported from zmq.error
? zmq.backend.zmq_poll imported from zmq.sugar.poll
? zmq.backend.zmq_version_info imported from zmq.sugar.version
This is not necessarily a problem - the modules may not be needed on this platform.
If I use the setup file below then nothing happens when I click click the exe (nor if I run it from a command prompt or a separate batch file).
If I edit the setup file to force
base = None
then when I run the exe a command prompt window briefly appears then disappears, and nothing else happens.
import sys
from cx_Freeze import setup, Executable
import xlwt, numpy, functools, copy, xlrd, time, os, matplotlib
base = None
if sys.platform == "win32":
base = "Win32GUI"
build_options = {"packages":["xlwt", "numpy", "functools", "copy", "xlrd", "time", "os", "matplotlib" ],
"include_files":["Mefisto_logo.jpg", "LOGO H2020 RIA.png", "logo_h2020_transparent.png",
"logo_minouw.png", "logo-csic.png", "logo-icm.png",
"logo-icm-ca-csic.png", "MEFISTO_userguide.pdf"] }
executables = [Executable("mefisto_main_10.py", base=base, icon="Mefisto_logo.ico")]
# Note for some reason the icon must be .ico - cx freeze will not work with either jpg or png
setup(name = "Mefisto",
version = "4.01",
description = "Mediterranean fisheries simulation tool",
options = {"build_exe": build_options},
executables = executables
)
My python script is a pyqt GUI with the following imported packages:
PyQt4, xlwt, numpy, functools, copy, xlrd, time, os, matplotlib
Should I include more/less of these imports in the build_options“packages”? I've tried including different ones but the result is the same.
Do I need to import these packages into the setup file? Doesn't seem to make a difference if I don't. It also seems like all the imported packages it needs are included in the build folder.
(If I include PyQt4 in the setup file then an error is thrown:
ImportError: No module named 'PyQt4.uic.port_v3.proxy_base'
but this seems to be a common problem and most solutions recommend no including PyQt4 in the setup file as it is imported automatically anyway)
I've also tried disabling my antivirus and firewall when running the exe as I have read this can cause problems, but the result is the same.
How am I meant to know what's not working here? It's driving me bananas! Is there a way to get an error report? Maybe there's a missing dll or something?

Well in the end I uninstalled and reinstalled Anaconda. This seemed to do the trick as now cx_freeze builds an exe which works fine. Not sure what happened to my previous install of Anaconda.
Hope this helps someone as it drove me up the wall!

Related

flow_from_directory cannot find path error in Spyder

I saw a lot of questions about the subject here but unfortunately didn't find one that solved my problem.I have the following code:
import numpy as np
from numpy import asarray
from PIL import Image
import tensorflow as tf
import keras
from keras.preprocessing.image import ImageDataGenerator
datagen =ImageDataGenerator()
train_it = datagen.flow_from_directory("C:/Users/agns1/Downloads/by_class.zip/by_class/4a/hsf_1", class_mode='binary', batch_size=10)
the data is from MNIST data set . and the error is :
FileNotFoundError: [WinError 3] The system cannot find the path specified: 'C:/Users/agns1/Downloads/by_class.zip/by_class/4a/hsf_1'
unfortunately, I cant seem to understand what is is the problem is it because of the zip ? Thank you:)

How to import TensorMetric in pytorch lighting?

I want to import TensorMetric :
from pytorch_lightning.metrics.metric import TensorMetric
The program throws an exception:
ModuleNotFoundError: No module named 'pytorch_lightning.metrics'
My environment is:
Python 3.8.13
tokenizers==0.9.2
torch==1.5.1
transformers==3.4.0
pytorch-lightning==0.9.0
tensorboard==2.2.0
0.9 is a very old version of Lightning and a lot has changed/improved since then. I would recommend you to use the latest version of PyTorch Lightning (1.6).
Also, we have metrics as a separate library now TorchMetrics.

How to use cx_freeze with wxPython?

I can't get cx_freeze to turn the simplest wxPython app to an .exe file.
I'd like to know how to proceed.
I'm using Python 3.6.8, wxPython 4.0.4 msw (phoenix) wxWidgets 3.0.5 and Windows 10.
I've tried freezing a complex wx App, it did not work so I tried with the simplest app I could think of.
Here's my wx app :
import wx
app = wx.App()
frm = wx.Frame(None, title="Hello World")
frm.Show()
app.MainLoop()
and here's the setup for cx_freeze :
from cx_Freeze import setup, Executable
build_exe_options = {
"packages": ["os", "wx"],
"excludes": ["tkinter"]}
setup(name="simplewxapp",
version="1",
description="simplewxapp",
options={"build_exe": build_exe_options},
executables=[Executable("simplewxapp.py", base="Win32GUI")])
When I use this command : python setup.py build I expect it to work correctly (as it does when I don't use wxPython).
Instead, I get this error message :
File "C:\Program Files\Python36\lib\site-packages\win32\lib\win32verstamp.py", line 159, in stamp
h = BeginUpdateResource(pathname, 0)
pywintypes.error: (2, 'BeginUpdateResource', 'Le fichier spécifié est introuvable.')
I also tried it with cx freeze the first time. No success on my side as well! I use pyinstaller at the moment and after some tweaks it is working perfectly fine.
You can find it here: https://www.pyinstaller.org/

cx_Freeze encodings for creating macOS application

I am trying to create a standalone Python3 macOS application including tkinter and selenium by using cx_Freeze. There are three files in my project:
tkinter_tab3.py (contains GUI)
user.txt (contains user info)
ver004.py (called from tkinter_tab3.py and executes tasks)
I created the following setup.py file with tkinter_tab3.py being the file to be turned into the executable:
from cx_Freeze import setup, Executable
# Dependencies are automatically detected, but it might need
# fine tuning.
buildOptions = dict(packages = ['encodings'], excludes = [])
includefiles = ['user.txt', 'ver004.py']
import sys
base = 'Win32GUI' if sys.platform=='win32' else None
executables = [
Executable('tkinter_tab3.py', base=base, targetName = 'suprbotcho')
]
setup(name='suprbotcho',
version = '1.0',
description = 'test',
options = dict(build_exe = buildOptions),
executables = executables)
However, when I run $python3 setup.py build then click on the created executable, I receive this error back in the terminal:
Fatal Python error: Py_Initialize: unable to load the file system codec
ModuleNotFoundError: No module named 'encodings'
In addition, when I run $python3 setup.py bdist.mac and $python3 setup.py bdist.dmg, I receive the following error:
build/suprbotcho-1.0.app/Contents/MacOS/lib/numpy/core/lib/libnpymath.a(npy_math.o):
error: can't copy 'build/suprbotcho-1.0.app/Contents/MacOS/lib/numpy/core/lib/libnpymath.a(npy_math.o):': doesn't exist or not a regular file
I do not understand where I am going wrong because I have read other posts about the encodings problem however I found no progress after trying out the posted solutions.
Here are the imports for each python file:
tkinter_tab3.py
from tkinter import *
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import Select, WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
import numpy as np
import time
from datetime import datetime
from threading import Timer
from ver004 import SuPrBoTcHo, InIt_UsEr
ver004.py
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import Select, WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
import numpy as np
import time
from datetime import datetime
from threading import Timer
from selenium.webdriver.common.action_chains import ActionChains
from selenium.common.exceptions import NoSuchElementException
If I could get help on fixing this particular problem, that would be great. If you have any particular questions, feel free to let me know.
(python version: 3.6.3)
I had the same problem.
The solution was to upgrade cxfreeze to the latest version, i.e do the following steps-
pip install -U cx_Freeze==6.0.b1

Missing modules for cx_freeze with qgis

I try to make a exe file from a Python programm which use PyQt and QGis with cx_freeze.
Here's the setup.py used by cx_freeze.
import sys
from cx_Freeze import setup, Executable
base = None
if sys.platform == 'win32':
base = 'Win32GUI'
options = {
'build_exe': {
'includes': ['atexit'],
'excludes': ['tkinter','tcl','tk'],
'packages': ['PyQt4.QtGui','PyQt4.Qt','qgis.core','qgis.gui','os']
}
}
executables = [
Executable('Open4.py', base=base)
]
setup(name='Open4',
version='1.1',
description='Open4 Icam',
options=options,
executables=executables
)
When I run this script, I can see this missing modules :
Missing modules:
? _emx_link imported from os
? ce imported from os
? org.python.core imported from copy
? os.path imported from Open4, ajouterunevoirie, open4__main__, os, qgis.utils, shlex
? os2 imported from os
? os2emxpath imported from os
? posix imported from os
? pwd imported from posixpath
? qgis.core.QGis imported from qgis.utils
? qgis.core.QgsApplication imported from qgis.core.contextmanagers
? qgis.core.QgsExpression imported from qgis.utils
? qgis.core.QgsFeature imported from qgis
? qgis.core.QgsGeometry imported from qgis
? qgis.core.QgsMessageLog imported from qgis.utils
? qgis.core.QgsMessageOutput imported from qgis.utils
? qgis.core.QgsProject imported from qgis.utils
? qgis.gui.QgisInterface imported from qgis.utils
? qgis.gui.QgsMapCanvas imported from ui_openihm
? qgis.server imported from qgis.utils
? riscos imported from os
? riscosenviron imported from os
? riscospath imported from os
? subprocess imported from os
but the script makes a build folder with an exe file and DLL and PYD files.
Question : cx_freeze says that qgis.core and qgis.gui are missing modules but I can see qgis._core.pyd, qgis._gui.pyd, qgis_core.dll and qgis_gui.dll in the build folder so do this modules really miss?
Now, when I try to run the EXE file, nothing appends but no error is reported even if I try to execute this EXE file in the console windows.
How can I solve this? Does it means that something (a module?) is missing?
Thank you for any help.
Philippe

Resources