py2app

Py2app: Operation not permitted

谁说胖子不能爱 提交于 2019-12-03 12:24:00
I want to create an application called 'dodgeball' and I have my main script (which uses pygame), and my setup.py script. I need an image named ball.bmp that I need as well. Inside my setup.py script I have the following code: from setuptools import setup APP = ['dodgeball.py'] DATA_FILES = ["ball.bmp"] OPTIONS = {'argv_emulation': True} setup( app=APP, data_files=DATA_FILES, options={'py2app': OPTIONS}, setup_requires=['py2app'], ) Whenever I try to make the application using the following stuff in Terminal: python setup.py py2app everything works up to *** creating application bundle:

How to create Mac application bundle for Python script via Python

浪子不回头ぞ 提交于 2019-12-03 09:31:29
I want to create a simple Mac application bundle which calls a simple Python script. I want to do that in Python. Is there an easy way? I tried to use py2app but that fails somehow, e.g.: from setuptools import setup setup(app=["foo.py"], setup_requires=["py2app"]) gives: --------------------------------------------------------------------------- SystemExit Traceback (most recent call last) /Users/az/<ipython console> in <module>() /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.pyc in setup(**attrs) 138 ok = dist.parse_command_line() 139 except

Problem using py2app with the lxml package

丶灬走出姿态 提交于 2019-12-03 07:51:48
I am trying to use 'py2app' to generate a standalone application from some Python scripts. The Python uses the 'lxml' package, and I've found that I have to specify this explicitly in the setup.py file that 'py2app' uses. However, the resulting application program still won't run on machines that haven't had 'lxml' installed. My Setup.py looks like this: from setuptools import setup OPTIONS = {'argv_emulation': True, 'packages' : ['lxml']} setup(app=[MyApp.py], data_files=[], options={'py2app' : OPTIONS}, setup_requires=['py2app']) Running the application produces the following output: MyApp

Building a Mac and Windows GUI Application

血红的双手。 提交于 2019-12-03 05:48:20
I am planning to build a GUI application for Mac and Windows. I've been doing some research in the technology choices, as in the language, libraries, and build tools, so that I can share as much code as possible between the two platforms. The main requirements are: Meets the Mac App Store requirements. Native look and feel on both Mac and Windows. Need to call into Quartz Window Services on Mac and the Windows API on Windows. Store and read data using SQLite. The length of my post has gotten out of control, so I moved my questions to the top as a summary, while the context is further below.

Python: py2app “ImportError: dlopen(): Library not loaded”

柔情痞子 提交于 2019-12-02 22:13:34
问题 I've written a python script that does some work with numpy and scikit's audiolab. I want to create a standalone app using py2app but I keep getting the same error no matter which OS X computer I test it on. ImportError: dlopen(/Users/transfer15/Desktop/app/dist/PCMAlign/app/Contents/Resources/lib/python2.7/numpy/linalg/lapack_lite.so, 2): Library not loaded: @rpath/libmkl_intel_lp64.dylib Referenced from: /Users/transfer15/Desktop/app/dist/PCMAlign/app/Contents/Resources/lib/python2.7/numpy

Python: py2app “ImportError: dlopen(): Library not loaded”

混江龙づ霸主 提交于 2019-12-02 08:33:16
I've written a python script that does some work with numpy and scikit's audiolab. I want to create a standalone app using py2app but I keep getting the same error no matter which OS X computer I test it on. ImportError: dlopen(/Users/transfer15/Desktop/app/dist/PCMAlign/app/Contents/Resources/lib/python2.7/numpy/linalg/lapack_lite.so, 2): Library not loaded: @rpath/libmkl_intel_lp64.dylib Referenced from: /Users/transfer15/Desktop/app/dist/PCMAlign/app/Contents/Resources/lib/python2.7/numpy/linalg/lapack_lite.so Reason: image not found This is somewhat strange to me because if I follow the

How do I use py2app with Anaconda python?

試著忘記壹切 提交于 2019-12-01 08:26:23
I am using Python 3 from the Anaconda distribution, and trying to convert a simple python program into an OS X app (running on El Capitan). Following the instructions in the tutorial , I ran py2applet --make-setup my-script.py python setup.py py2app -A Everything ran fine with no errors, but when I try to launch the app, I get this error message: my-script: A python runtime not could (sic) be located. You may need to install a framework build of Python, or edit the PyRuntimeLocations array in this applications Info.plist file. I understood this to mean I should add the path of Anaconda's

How do I use py2app with Anaconda python?

爱⌒轻易说出口 提交于 2019-12-01 05:56:30
问题 I am using Python 3 from the Anaconda distribution, and trying to convert a simple python program into an OS X app (running on El Capitan). Following the instructions in the tutorial, I ran py2applet --make-setup my-script.py python setup.py py2app -A Everything ran fine with no errors, but when I try to launch the app, I get this error message: my-script: A python runtime not could (sic) be located. You may need to install a framework build of Python, or edit the PyRuntimeLocations array in

How to force py2app to run app in 32-bit mode

流过昼夜 提交于 2019-11-30 18:15:24
问题 I am trying to build an app bundle with py2app on Mac OS X 10.6. The app uses some libraries which are only compiled for 32-bit, so when the app is run there is an ImportError "no appropriate 64-bit architecture". How can I tell py2app to force the app to run in 32-bit mode? 回答1: One way is to use a 32-bit-only Python, such as the 32-bit-only versions downloadable from python.org, with py2app. Another is to set the LSArchitecturePriority to i386 and possibly ppc in the generated app bundle's

How to create a Mac OS X app with Python?

我是研究僧i 提交于 2019-11-29 19:52:56
I want to create a GUI application which should work on Windows and Mac. For this I've chosen Python. The problem is on Mac OS X. There are 2 tools to generate an ".app" for Mac: py2app and pyinstaller. py2app is pretty good, but it adds the source code in the package. I don't want to share the code with the final users. Pyinstaller generates UNIX executable, so how to run it on Mac? I created a bundles with this executable, but the resulted ".app" is not working. The questions are: How to configure py2app to include the source code in the executable, so the final users will not have access to