3

I'm writing an OS X application that uses a Python script which imports a third-party library, eyed3. The script is called with NSTask, and works as intended if I use my Homebrew Python, which has eyed3 installed via pip. This is expected.

I want to include all of this inside the application so the user does not need to have Homebrew, eyed3, or anything other than my Application.app file.

I have the python script, EditChaptersScript.py, included in my Xcode project, and I've included the eyed3 framework in my Frameworks group, as shown in the link below.

Image of Project Structure in Xcode

When I run the NSTask, and I pipe the output to my Xcode console, I get the following error: /usr/bin/python: Import by filename is not supported.

Does anyone know what I need to do in order to get my script, with the framework it imports, included in my binary working with the system Python?

Thomas Pritchard
  • 429
  • 3
  • 11
  • This looks interesting: http://stackoverflow.com/questions/25997185/python-importerror-import-by-filename-is-not-supported – Eric Aya Nov 15 '15 at 13:44

0 Answers0