PythonKit error loading modules

I've been trying to get some PythonKit code running on Ubuntu and having a terrible time. The issue is coming up when Python tries to load from packages/modules called by a script. Code I'm able to run from Xcode on macOS, calling into PythonKit, doesn't run in Vapor. The odd thing is the error:

iPythonKit/Python.swift:674: Fatal error: 'try!' expression unexpectedly raised an error: Python exception: ('invalid syntax', ('/home/james/swift/vapor/SpliqsAPI/Sources/SpliqsLib/SpliqsML/core/helper_functions.py', 13, 26, 'def get_model_config(args: ModelDataArguments):\n'))

This seems to suggest that it's not parsing the module file itself properly—i.e., seeing 'invalid syntax' just because the text file has a carriage return??? Any thoughts what might be going on? I realize this may specifically be a Vapor problem, but it’s such a particular error that I thought someone might have an idea about what’s going on.