With the py2app package you can compile a Python script and create a portable Mac application. If you’re using windows, you can check py2exe. First of all, we need to install the py2app python package. First, create your program or application using python and then make setup file for your application. And then build the app using build command python setup.py build, according to your requirement you need to make some changes, to make mac bundle or mac app refer this. The part of the question that says 'I don't want to force my clients to install Python and modules.' It doesn't say the clients can't do it, it says the developer doesn't want to require them to do it. There's no point in debating the point here, because the clients are not reading SO to speak for themselves. ![]() ![]() I wouldn't want to install a Flash development environment just to watch youtube, or a C development environment just to play Sudoku, or a Python development environment to run a version of Angry Birds written in Python. That's what redistributable runtimes are for. – Nov 11 '11 at 20:03 •. I tried them all, the PyInstaller and others (py2exe, freeze, cython, embedded version of python and etc) still can't handle dependency of the python dynamic library itself at least in the Windows (python*.dll). The dll has dependency on the runtime which HAS TO BE installed separately. After the process you gain the executable which will be linked to the dll and so has the same importability. So your 'standalone' executable is not much standalone, but more like embeddable. To workaround the runtime dependency you HAVE TO rebuild the python from the source using cpython project. – Jul 13 '17 at 8:33. I would like to compile some useful information about creating standalone files on windows using Python 2.7. I have used py2exe and it works, but I had some problems. • It has shown some problems for creating single files in Windows 64 bits:; • It is necessary to create a setup.py file for it to work.; • I have had problems with dependencies that you have to solve by importing packages in the setup file; • I was not able to make it work together with PyQt. Note: • HTC Sync Manager will no longer be supported in HTC Desire 12, HTC Desire 12+, HTC U12+, and later phone models. This last reason made me try PyInstaller. In my opinion, it is much better because: • It is easier to use. I suggest creating a.bat file with the following lines for example (pyinstaller.exe must be in Windows Path): pyinstaller.exe --onefile MyCode.py • You can create a single file, among other options (). • I had only one problem using PyInstaller and multiprocessing package that was solved by using this recipe:. So, I think that, at least for python 2.7, a better and simpler option is PyInstaller. Pyinstaller has import problems. For example: in my case, I'm in this DIR ~/Documents/python101/ and ex50_pycomp.py & ex50.py are in this dir. Ex50_pycomp.py importing ex50.py. I run pyinstaller ex50_pycomp.py and i see all complied, produced dist. All good right? I cd into dist/ex50_pycomp/ and run ex50_pycomp it works. Once I put this ex50_pycom into a virtualmachine, then this says import error and in another other linux box it says ' -bash:./ex_50_pycom: cannot execute binary file: Exec format error' – Sep 18 '18 at 4:31 •. Usb second portable monitor for mac. Prob1:I was using python2.7 but pyinstaller was talking with python3 python3 setup.py build python3 setup.py install your python3 will get all pkg_resources prob 3:if using sys_path becomes a problem so give your path like this pyinstaller --hidden-import=pkg_resources --onefile file.py --path=my_path rw-rw-r-- my_path:python3's dist folder pyinstaller --hidden-import=pkg_resources --onefile file.py --path=/usr/local/lib/python3.5/dist-packages/my_code_lib-0+untagged.8.gd264bd5.dirty-py3.5.egg/my_folder -rw-rw-r-- – Sep 29 '18 at 19:53.
0 Comments
Leave a Reply. |