I need a way to call Python code from Swift on an Apple platform. A library would be ideal. I\'ve done a considerable amount of Google searching, and the closest material I
In swift 5 you can try PythonKit framework.
Here's example of the usage:
import PythonKit let sys = try Python.import("sys") print("Python \(sys.version_info.major).\(sys.version_info.minor)") print("Python Version: \(sys.version)") print("Python Encoding: \(sys.getdefaultencoding().upper())")