Ir para conteúdo
Fórum Script Brasil

michel almeida

Membros
  • Total de itens

    7
  • Registro em

  • Última visita

Sobre michel almeida

michel almeida's Achievements

0

Reputação

  1. jhonas muito obrigado pela ajuda mais um tópico resolvido se não fosse sua ajuda eu não teria resolvido de pois de tanto tempo
  2. galera consegui fazer funcionar e compilar códigos.py o erro era a versão que o programa foi feito em python 2.5, pygame, numpy agradeço a ajuda e tamos aqui para qualquer duvida tamos ai em forca total The following modules appear to be missing ['Carbon', 'Carbon.Files', 'Numeric', 'OpenGL.GL', 'SCons', 'SCons.Action', 'SCo ns.Builder', 'SCons.Node', 'StdSuites.Standard_Suite', '__config__', '__svn_vers ion__', '_curses', '_scproxy', '_sysconfigdata', 'aetools', 'builtins', 'code_ge nerators', 'code_generators.generate_numpy_api', 'code_generators.generate_ufunc _api', 'compat.long', 'configparser', 'copyreg', 'core.abs', 'core.max', 'core.m in', 'core.round', 'fcompiler.FCompiler', 'genapi', 'itertools.imap', 'nose', 'n ose.plugins', 'nose.plugins.base', 'nose.plugins.builtin', 'nose.plugins.errorcl ass', 'nose.util', 'numarray', 'numpy.CLIP', 'numpy.RAISE', 'numpy.WRAP', 'numpy .absolute', 'numpy.add', 'numpy.all', 'numpy.allclose', 'numpy.amax', 'numpy.ami n', 'numpy.any', 'numpy.arccos', 'numpy.arccosh', 'numpy.arcsin', 'numpy.arcsinh ', 'numpy.arctan', 'numpy.arctan2', 'numpy.arctanh', 'numpy.argsort', 'numpy.aro und', 'numpy.array', 'numpy.array_equal', 'numpy.array_equiv', 'numpy.array_repr ', 'numpy.array_str', 'numpy.bitwise_and', 'numpy.bitwise_or', 'numpy.bitwise_xo r', 'numpy.bool_', 'numpy.ceil', 'numpy.clip', 'numpy.compat.asbytes', 'numpy.co mpat.asbytes_nested', 'numpy.compat.asstr', 'numpy.compat.basestring', 'numpy.co mpat.bytes', 'numpy.compat.integer_types', 'numpy.compat.isfileobj', 'numpy.comp at.long', 'numpy.compat.open_latin1', 'numpy.compat.unicode', 'numpy.concatenate ', 'numpy.conjugate', 'numpy.core.Inf', 'numpy.core.absolute', 'numpy.core.add', 'numpy.core.all', 'numpy.core.amax', 'numpy.core.amin', 'numpy.core.any', 'nump y.core.arange', 'numpy.core.around', 'numpy.core.array', 'numpy.core.asarray', ' numpy.core.atleast_1d', 'numpy.core.atleast_2d', 'numpy.core.atleast_3d', 'numpy .core.bitwise_and', 'numpy.core.bitwise_or', 'numpy.core.bitwise_xor', 'numpy.co re.broadcast', 'numpy.core.cdouble', 'numpy.core.complexfloating', 'numpy.core.c oncatenate', 'numpy.core.conjugate', 'numpy.core.csingle', 'numpy.core.divide', 'numpy.core.dot', 'numpy.core.double', 'numpy.core.empty', 'numpy.core.empty_lik e', 'numpy.core.equal', 'numpy.core.errstate', 'numpy.core.fastCopyAndTranspose' , 'numpy.core.finfo', 'numpy.core.float32', 'numpy.core.float64', 'numpy.core.fl oat_', 'numpy.core.geterrobj', 'numpy.core.greater', 'numpy.core.greater_equal', 'numpy.core.hstack', 'numpy.core.inexact', 'numpy.core.inf', 'numpy.core.intc', 'numpy.core.integer', 'numpy.core.invert', 'numpy.core.isfinite', 'numpy.core.i sinf', 'numpy.core.isnan', 'numpy.core.isscalar', 'numpy.core.left_shift', 'nump y.core.less', 'numpy.core.less_equal', 'numpy.core.linspace', 'numpy.core.longdo uble', 'numpy.core.maximum', 'numpy.core.multiply', 'numpy.core.ndarray', 'numpy .core.newaxis', 'numpy.core.not_equal', 'numpy.core.number', 'numpy.core.power', 'numpy.core.product', 'numpy.core.ravel', 'numpy.core.remainder', 'numpy.core.r eshape', 'numpy.core.right_shift', 'numpy.core.rollaxis', 'numpy.core.shape', 'n umpy.core.signbit', 'numpy.core.sin', 'numpy.core.single', 'numpy.core.size', 'n umpy.core.sqrt', 'numpy.core.subtract', 'numpy.core.sum', 'numpy.core.swapaxes', 'numpy.core.take', 'numpy.core.transpose', 'numpy.core.ufunc', 'numpy.core.vsta ck', 'numpy.core.zeros', 'numpy.cos', 'numpy.cosh', 'numpy.deprecate', 'numpy.di agonal', 'numpy.divide', 'numpy.dot', 'numpy.dtype', 'numpy.e', 'numpy.empty', ' numpy.equal', 'numpy.exp', 'numpy.expand_dims', 'numpy.eye', 'numpy.fabs', 'nump y.floor', 'numpy.floor_divide', 'numpy.fmod', 'numpy.greater', 'numpy.greater_eq ual', 'numpy.histogramdd', 'numpy.hypot', 'numpy.inner', 'numpy.integer', 'numpy .intp', 'numpy.invert', 'numpy.iscomplexobj', 'numpy.isnan', 'numpy.kron', 'nump y.left_shift', 'numpy.less', 'numpy.less_equal', 'numpy.lexsort', 'numpy.lib.add _newdoc', 'numpy.lib.asfarray', 'numpy.lib.i0', 'numpy.lib.imag', 'numpy.lib.isc omplexobj', 'numpy.lib.real', 'numpy.lib.triu', 'numpy.linalg.eigvals', 'numpy.l inalg.inv', 'numpy.linalg.lstsq', 'numpy.log', 'numpy.log10', 'numpy.logical_and ', 'numpy.logical_not', 'numpy.logical_or', 'numpy.logical_xor', 'numpy.ma.MAErr or', 'numpy.ma.MaskedArray', 'numpy.ma.filled', 'numpy.ma.getdata', 'numpy.ma.ge tmaskarray', 'numpy.ma.make_mask_descr', 'numpy.ma.masked', 'numpy.ma.masked_arr ay', 'numpy.ma.nomask', 'numpy.maximum', 'numpy.minimum', 'numpy.multiply', 'num py.ndarray', 'numpy.negative', 'numpy.newaxis', 'numpy.nonzero', 'numpy.not_equa l', 'numpy.numarray.get_numarray_include_dirs', 'numpy.outer', 'numpy.pi', 'nump y.power', 'numpy.product', 'numpy.putmask', 'numpy.rank', 'numpy.ravel', 'numpy. recarray', 'numpy.remainder', 'numpy.resize', 'numpy.right_shift', 'numpy.search sorted', 'numpy.shape', 'numpy.sign', 'numpy.sin', 'numpy.sinh', 'numpy.size', ' numpy.sort', 'numpy.sqrt', 'numpy.subtract', 'numpy.sum', 'numpy.swapaxes', 'num py.tan', 'numpy.tanh', 'numpy.trace', 'numpy.transpose', 'numpy.true_divide', 'n umpy.uint32', 'numpy.vdot', 'numpy_api', 'numpy_distutils', 'numpy_distutils.com mand.build_flib', 'numpy_distutils.command.cpuinfo', 'numpy_distutils.cpuinfo', 'numpy_distutils.fcompiler', 'numscons', 'numscons.core.utils', 'numscons.numdis t', 'pkg_resources', 'queue', 'scipy', 'setuptools', 'setuptools.command', 'setu ptools.command.bdist_rpm', 'setuptools.command.develop', 'setuptools.command.egg _info', 'setuptools.command.install', 'setuptools.command.sdist', 'sitecustomize ', 'testing.Tester', 'urllib.error', 'urllib.parse', 'urllib.request', 'usercust omize', 'win32api', 'win32con', 'win32pdh', 'win32pipe', 'winreg', 'pygame.SRCAL PHA', 'pygame.sdlmain_osx'] *** binary dependencies *** Your executable(s) also depend on these dlls which are not included, you may or may not need to distribute them. Make sure you have the license if you distribute any of them, and make sure you don't distribute files belonging to the operating system. OLEAUT32.dll - C:\Windows\system32\OLEAUT32.dll USER32.dll - C:\Windows\system32\USER32.dll IMM32.dll - C:\Windows\system32\IMM32.dll SHELL32.dll - C:\Windows\system32\SHELL32.dll ole32.dll - C:\Windows\system32\ole32.dll COMDLG32.dll - C:\Windows\system32\COMDLG32.dll fftpack_lite.pyd - C:\Python27\lib\site-packages\numpy\fft\fftpack_lite.pyd COMCTL32.dll - C:\Windows\system32\COMCTL32.dll ADVAPI32.dll - C:\Windows\system32\ADVAPI32.dll _umath_linalg.pyd - C:\Python27\lib\site-packages\numpy\linalg\_umath_linalg. pyd msvcrt.dll - C:\Windows\system32\msvcrt.dll WS2_32.dll - C:\Windows\system32\WS2_32.dll GDI32.dll - C:\Windows\system32\GDI32.dll WINMM.dll - C:\Windows\system32\WINMM.dll KERNEL32.dll - C:\Windows\system32\KERNEL32.dll eu cansado de bater cabeça com um código quando eu tento transforma-lo em (.exe) quando executo o cmd conpila normal mas chega numa parte que diz que falta um monte de modulos esse e todo em python2.7 e pygame+numpy
  3. os scripts tem o principal que chama os outros na IDE se eu precionar a tecla f5 ele executa funciona não da erro mas se eu quiser converter de .py para .exe eu importo os modulos dessa forma try: from distutils.core import setup import py2exe, pygame from modulefinder import Module import glob, fnmatch import sys, os, shutil except ImportError, message: raise SystemExit, "Unable to load module. %s" % message class pygame2exe(py2exe.build_exe.py2exe): def copy_extensions(self, extensions): pygamedir = os.path.split(pygame.base.__file__)[0] pygame_default_font = os.path.join(pygamedir, pygame.font.get_default_font()) extensions.append(Module("pygame.font", pygame_default_font)) py2exe.build_exe.py2exe.copy_extensions(self, extensions) class BuildExe: def __init__(self): #Name of starting .py self.script = "pyLAUNCH.py" #Name of program self.project_name = "pyLAUNCH (Python Launcher)" #Version of program self.project_version = "0.95" #License of the program self.license = "Free!" #Auhor of program #Description self.project_description = "Front-end for arcade machines" #Icon file (None will use pygame default icon) self.icon_file = "pylaunch.ico" #Extra files/dirs copied to game self.extra_datas = [] #Extra/excludes python modules self.extra_modules = [] self.exclude_modules = [] #DLL Excludes self.exclude_dll = [''] #Zip file name (None will bundle files in exe instead of zip file) self.zipfile_name = None #Dist directory self.dist_dir ='dist' ## Code from DistUtils tutorial at http://wiki.python.org/moin/Distutils/Tutorial ## Originally borrowed from wxPython's setup and config files def opj(self, *args): path = os.path.join(*args) return os.path.normpath(path) def find_data_files(self, srcdir, *wildcards, **kw): # get a list of all files under the srcdir matching wildcards, # returned in a format to be used for install_data def walk_helper(arg, dirname, files): if '.svn' in dirname: return names = [] lst, wildcards = arg for wc in wildcards: wc_name = self.opj(dirname, wc) for f in files: filename = self.opj(dirname, f) if fnmatch.fnmatch(filename, wc_name) and not os.path.isdir(filename): names.append(filename) if names: lst.append( (dirname, names ) ) file_list = [] recursive = kw.get('recursive', True) if recursive: os.path.walk(srcdir, walk_helper, (file_list, wildcards)) else: walk_helper((file_list, wildcards), srcdir, [os.path.basename(f) for f in glob.glob(self.opj(srcdir, '*'))]) return file_list def run(self): if os.path.isdir(self.dist_dir): #Erase previous destination dir shutil.rmtree(self.dist_dir) #Use the default pygame icon, if none given if self.icon_file == None: path = os.path.split(pygame.__file__)[0] self.icon_file = os.path.join(path, 'pygame.ico') #List all data files to add extra_datas = [] for data in self.extra_datas: if os.path.isdir(data): extra_datas.extend(self.find_data_files(data, '*')) else: extra_datas.append(('.', [data])) setup( cmdclass = {'py2exe': pygame2exe}, version = self.project_version, description = self.project_description, name = self.project_name, url = self.project_url, author = self.author_name, author_email = self.author_email, license = self.license, # targets to build windows = [{ 'script': self.script, 'icon_resources': [(0, self.icon_file)], 'copyright': self.copyright }], options = {'py2exe': {'optimize': 2, 'bundle_files': 1, 'compressed': True, \ 'excludes': self.exclude_modules, 'packages': self.extra_modules, \ 'dll_excludes': self.exclude_dll} }, zipfile = self.zipfile_name, data_files = extra_datas, dist_dir = self.dist_dir ) if os.path.isdir('build'): #Clean up build dir shutil.rmtree('build') if __name__ == '__main__': if len(sys.argv) < 2: sys.argv.append('py2exe') BuildExe().run() #Run generation raw_input("Press any key to continue") #Pause to let user see that things ends dessa forma cria um executavel com o icone e tudo mas quando clico nele não funciona
  4. o jonas eo de cima o mesmo de cima que falta os modulos já instalei denovo tudo quando compila não funciona se eu postar sera que alguém poderia testar para ver se compila quando eu executo funciona perfeito e so quando compila
  5. obrigado amigo pelo que eu já li e muito show os dois links e depois mostro o resultado certo eu to devolta com mais uma duvida quendo executo ele compila mas com erro e não funciona e me da essa mensagem de bug que falta esses modulos agora o negocio pego e essa a a mensagem The following modules appear to be missing ['AppKit', 'Foundation', 'OpenGL.GL', 'configparser', 'copyreg', 'dotblas', 'io', 'multiprocessing', 'numpy', 'pkg_resources', 'queue', 'winreg', 'pygame.sdlmain_osx'] :(
  6. bom amigos esse e meu primeiro postagem no forum ea minha duvida e como se cria uma estrutura para compilar. criar executaveis para windows eu tenho o python 2.7 amd64bits no win7 64bts e em conjunto pygame,numpy,e py2exe eu consigo rodar o progama mas não criar um executavel para windows se quiser ver como o progama foi feito e so pedir que eu posto eu já vi alguns videos mas não funciona aqui comigo teria que ser um padrão para quando quiser criar um executavel funciona de boa eu agradeco a atencao de que quiser me ajudar eu moro em manaus e aqui não tem curso e pessoas que possam me da uma luz sobre esse asunto
×
×
  • Criar Novo...