How do I use py2app with a virtual environment?
Asked Answered
A

0

0

I'm trying to create an app with py2app and a simple Tkinter Python 3 program. My setup.py file is the default one created when running the py2applet --make-setup command. When I try to build the app, numerous files are copied to the app bundle but I get the this error: error: can't copy '/Users/bill/.virtualenvs/tk3/Resources/Python.app/Contents/MacOS/Python': doesn't exist or not a regular file. And when I try to open the built app, I get a dialog window with

A Python runtime could not be located. You may need to install a framework build of Python or edit the PyRuntimeLocations array in this application's Info.plist file.

I installed Python 3 with homebrew.

Antinode answered 28/9, 2014 at 3:16 Comment(2)
py2app is not copying the python framework to the new app while using virutalenvSorcerer
@kums: Thanks, that's exactly what the issue was. Running the command python3 setup.py py2app outside the virtual environment copied the python framework successfully.Antinode

© 2022 - 2024 — McMap. All rights reserved.