问题遇到的现象和发生背景
问题相关代码,请勿粘贴截图
PythonInterpreter interpreter = new PythonInterpreter();
PySystemState sys = Py.getSystemState();
InputStream filepy = new FileInputStream(”.py文件路径“);
运行结果及报错内容
Traceback (most recent call last):
File "", line 2, in
File "E:\javaWorkSpace\project??????????????\vaccineproduction_workspace\python\Lib\venv\Lib\site-packages\pandas_init_.py", line 12
except ImportError as e:
SyntaxError: mismatched input 'as' expecting COLON
我的解答思路和尝试过的方法
尝试过PySystemState sys = Py.getSystemState();
sys.path.add(PythonComponent.ROOT_PYTHON_DIRECTORY + "Lib\venv\Lib\site-packages");
手动引包,但是无济于事
我想要达到的结果
成功调接Python方法