【问题标题】:How to run .exe file (created in Windows) in python如何在 python 中运行 .exe 文件(在 Windows 中创建)
【发布时间】:2020-11-28 15:55:45
【问题描述】:

我有一个包含骨架化功能的 .exe 文件。 我要做的是运行命令并给出输入(输入图像+一些参数)并得到这样的骨架:

系统 Skel_current.exe 输入图像 'outputimage.png' 'param1' 'param2'

问题是我的 jupyter notebook 无法指向 .exe 文件。经过几次试验,我通过安装wine得到了第一个解决方案,并且能够在脚本Shell中执行命令。但无法在 jupyter 笔记本中执行它。在 jupyter notebook 中运行此命令时:

wine Skel_current.exe class1 'image.png' '4.00000' '0.01000'

我收到了这个错误:

=002b:fixme:msvcrt:type_info_name_internal_method type_info_node 参数被忽略 wine:在地址 00000001400293D3(线程 002b)读取访问 0000000000000000 时出现未处理的页面错误,正在启动调试器... 002d:fixme:dbghelp:elf_search_auxv 在模块中找不到符号 ...002d:fixme:dbghelp:interpret_function_table_entry PUSH_MACHFRAME 6

【问题讨论】:

    标签: python linux windows


    【解决方案1】:

    我终于找到正确的命令了!!

    subprocess.run(["wine","Skel_current.exe", 'image.png','skel.png' ,'param1' ,'param2'])

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2014-10-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-02-27
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多