我有一个连接到Oracle db并导出到excel文件的Python脚本。在Python中,脚本可以工作,但是当我试图从java运行它时,会得到以下错误:
import cx_Oracle
ModuleNotFoundError: No module named 'cx_Oracle'.
我有甲骨文的客户,并已设置甲骨文的家。
我的代码:
Process p = Runtime.getRuntime().exec(new String[]{"python3", "path_to_py_file"});