Python py2app Tutorial - Making a Standalone Distributable Application with Icon

preview_player
Показать описание
Making a Standalone Application with custom Icon with a python script, thats been made in Tkinter.

from setuptools import setup

OPTIONS = {
'argv_emulation': True,
'packages': ['certifi'],
}

setup(
app=APP,
data_files=DATA_FILES,
options={'py2app': OPTIONS},
setup_requires=['py2app'],
)
Рекомендации по теме
Комментарии
Автор

My man just posted a video that can help everyone why isn’t this viral

apple.official
Автор

I don't think you understand how helpful you have been. You are just oblivious to how awesome you are for doing this lol. Thank you bro 👍

tommyv
Автор

Very useful information, well explained. Thank you so much!

kanikan
Автор

This is so helpful! Along with the the solution to Ross's question in the comment helped me get through it!

tigerxzm
Автор

thank you for the tutorial.
so what about requirement.txt? don't we need it?
so for example i have 2 py files in one app, i put the app.py in APP, and the function.py in DATA_FILES?

YeungLorentz
Автор

I just tried this, but i had some problems:
How does py2app handle when you import modules in code?
If your code prints outputs in terminal, does py2app open a terminal when it executes?

portfedh
Автор

Hi sir could you please tell us how to specify Plist options like hide icons using the py2app arguments like LSUIElement, LSBackgroundOnly.Thanks. I subbed li

Gamer-xkbk
Автор

when i run the app i get app error :( some solution i tried everything

bailonpaucarmontes
Автор

TonSecret has encountered a fatal error, and will now terminate.
A python runtime not could be located.
You may need to install a framework build of python or edit the PyRuntimelocations array in this applications info.plist file

sachalevy
Автор

perfect video really but one thing i want to know as i saw python3.7 written while you're building with pip not pip3 ! should I use pip or pip3 to install virtualenv while my code is built in python 3.7 ? thanks

abdelwagedmohamed
Автор

when i try to do pip install virtual env, I get the error: -bash: pip: command not found. why is that?

neelshandal
Автор

can I open the app on macOS high sierra

User-qjsd
Автор

Thanks for the video man,
can I build mac app same like you have did in Linux?

prashantvidja
Автор

I am unable to have a logo on my app, or else it's all good. Can anyone help me?

apoorva
Автор

get all the way to testing and get "testapp has encountered a fatal error, and will now terminate. A python runtime could not be located you may need to install a framework build of Python, or edit PyRunimeLocations array in this application's Info.plist file. Any ideas what causes that?

michaelrogers
Автор

Are all the app dependencies in the package in this dock? if a user who does not have Python or something else on his Mac wanted to use it, would it work?

Rednunzio
Автор

can't open file 'setup.py': [Errno 2] No such file or directory

fluffyhead-zn
Автор

Thank you for this video!
What is the benefit of putting it in the virtual environment first? (I'm asking because when I try this in a virtualenv I get a Errno 63 'File name too long' error. But when I package outside of venv, It doesn't get this...but I get another error...

joeshiro
Автор

File "/Users/rossw01/BEST_DIR/lib/python3.7/site-packages/py2app/build_app.py", line 567, in finalize_options
if isinstance(self.plist, plistlib.Dict):
AttributeError: module 'plistlib' has no attribute 'Dict'


:(

RossWasTaken
Автор

Original error was: dlopen(/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/numpy/core/_multiarray_umath.cpython-311-darwin.so, 0x0002): tried: (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e'))
How to fix this issues?

BhaiyaZeeBro
visit shbcf.ru