I'm trying to make a simple password app on my desktop from a code I wrote. I've done this before with no troubles on another simple app.
This is my setup:
from setuptools import setup
APP = ['main.py']
OPTIONS = {
'argv_emulation': True,
'iconfile':"logo.png",
'packages': ['tkinter', 'random', 'json', 'pyperclip']
}
setup(
app=APP,
options={'py2app': OPTIONS},
setup_requires=['py2app'],
)
This is the last few lines of code that run in my terminal if I run Python 3 setup.py py2app
/Users/cjsander/Desktop/Password/build/bdist.macosx-10.9-universal2/python3.12- standalone/app/collect/typing_extensions-4.12.2.dist-info/METADATA
error: [Errno 17] File exists: '/Users/cjsander/Desktop/Password/build/bdist.macosx-10.9- universal2/python3.12-standalone/app/collect/packaging-24.1.dist-info'
The Dist is never created, and even when I move folders that I attempt to run the code from or delete all previous Dist and Build folders this error is produced.
I've tried to move the file location, delete previous DIST and BUILD folders, uninstalled and reinstalled py2app including not updating the install. I've also tried on other code files and the same thing happens.
All resulted with the same error, even when the file doesn't exist.
This is a known issue in setuptools >= 70.0.2.
Pin 70.3.0
to get past it. For example in a pyproject.tml
:
[tool.poetry.dependencies]
python = "^3.12"
pyqt5 = "^5.15.10"
setuptools = "==70.3.0" # add this line