0
我編寫了一個簡單的Python服務器,其中包括Java庫Tabula的tabula-py包裝器。在本地測試之後,使用相應的客戶端並確定一切正常,我嘗試在vanilla Ubuntu Server 16.04 VBox實例上運行它。正如我正在運行時錯誤(下同),我試圖使用Python CLI一個簡單的測試:無法在vanilla Ubuntu服務器上設置Python環境
>>> import tabula
>>> df = tabula.read_pdf("https://www.autotrolej.hr/att/wp-content/uploads/2016/04/lin-2-vazi-od-16-01-2017.pdf")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/ubuntu/.local/lib/python2.7/site-packages/tabula/wrapper.py", line 54, in read_pdf_table
output = subprocess.check_output(args)
File "/usr/lib/python2.7/subprocess.py", line 567, in check_output
process = Popen(stdout=PIPE, *popenargs, **kwargs)
File "/usr/lib/python2.7/subprocess.py", line 711, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1343, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
服務器從命令行啓動和所使用的家當是:
#!/usr/bin/env python
我嘗試導出pip凍結要求並在VBox服務器上安裝相同的庫,以便在許多這些庫的安裝期間獲得相同的子進程錯誤。我猜這是Python環境問題,因爲Ubuntu服務器沒有預安裝Python,所以我可能忽略了安裝重要的核心庫或設置環境變量。我錯過了什麼?
是的,Java不見了,TNX ... – krsnik93