对于我的应用程序,我使用 tabula 包将 pdf 转换为 csv。我写的云函数是在python3.7中的。我把它写在 requirements.txt 文件中。但我收到了这个错误
File "/layers/google.python.pip/pip/lib/python3.7/site-packages/tabula/io.py", line 91, in _run raise JavaNotFoundError(JAVA_NOT_FOUND_ERROR) tabula.errors.JavaNotFoundError: `java` command is not found from this Python process.Please ensure Java is installed and PATH is set for `java`
需求文件
tabula-py==1.4.1
主文件
import tabula
df = tabula.read_pdf('/tmp/' + file_id +'.pdf', pages = required_page)[0]
tabula.convert_into('/tmp/' + file_id +'.pdf', '/tmp/' + file_id +'.csv',output_format="csv",pages=required_page, stream=False)
我该如何解决这个问题?有什么替代方案吗?