我使用的是Ubuntu12.04,我看到下面的錯誤,在我看來它是以某種方式python試圖調用adb命令,但失敗。Python subprocess.CalledProcessError:命令'adb設備'返回非零退出狀態127
/bin/sh: 1: adb: not found
Traceback (most recent call last):
`File "./test.py", line 1395, in <module>
main()
File "./test.py", line 1218, in main
Device.wait_for_device(TIMEOUT, None, a.getport())
File "./test.py", line 433, in wait_for_device
if (len(a) == 1 and get_attached_devices()):
File "./test.py", line 126, in get_attached_devices
lines = subprocess.check_output(adb_rel_path + 'adb devices', shell =True).split('\n')
File "/usr/lib/python2.7/subprocess.py", line 544, in check_output
raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command 'adb devices' returned non-zero exit status 127
我跟着instructinos到安設pyadb: https://pypi.python.org/pypi/pyadb/0.1.1
但仍須好好嘗試的工作。我現在不知道。 有誰知道我是否缺少任何軟件包或程序?
你應該發佈一些你的代碼片段去與此。此外,它看起來像,它並不是python缺少一個包,因爲adb程序/腳本沒有安裝在python腳本認爲它的地方(如adb_rel_path給出的那樣) –