[英]is not recognized as an internal or external command, operable program or batch file
I'm trying to call an external function from Python: the function is vboxmanage.exe and I'm accessing it via subprocess call.我正在尝试从 Python 调用外部函数:该函数是 vboxmanage.exe,我通过子进程调用访问它。 The problem is that call cannot find the vboxmanage.exe program, even though it is listed in the path variable.
问题是调用找不到 vboxmanage.exe 程序,即使它列在路径变量中。 I have tried every possible combination, with path, without path, with listing the full director, without listing the director, but call never finds it: vboxmanage is not recognized as an internal or external command, operable program or batch file.
我已经尝试了所有可能的组合,有路径,没有路径,列出完整导演,不列出导演,但调用从未找到它:vboxmanage 不被识别为内部或外部命令、可运行的程序或批处理文件。
Here my questions:这是我的问题:
from subprocess import call
param="c:\\Program Files\Oracle\VirtualBox\\vboxmanage controlvm MacBook keyboardputscancode "+h
print (param)
call([param], shell=True)
Just go to these folder: C:\\Program Files\\Oracle\\VirtualBox
and copy all the files there and then paste them in this folder: C:\\Users\\username\\VirtualBoxVMs\\Ubuntu64
which contains the .VDI files.只需转到以下文件夹:
C:\\Program Files\\Oracle\\VirtualBox
并复制那里的所有文件,然后将它们粘贴到此文件夹中: C:\\Users\\username\\VirtualBoxVMs\\Ubuntu64
,其中包含 .VDI 文件。 Then open command prompt and navigate to this folder: C:\\Users\\Username\\VirtualBoxVMs\\Ubuntu64
and run your command from there and it will be recognize.然后打开命令提示符并导航到此文件夹:
C:\\Users\\Username\\VirtualBoxVMs\\Ubuntu64
并从那里运行您的命令,它将被识别。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.