python - 在ubuntu中一次调用多次调用cython转换的应用程序
问题描述
我将py
代码转换为c
with cython
,并在如下环境中编译为可执行应用程序ubuntu
:
cython mmd_ai_release.py --embed
gcc `python3.7-config --cflags --ldflags` mmd_ai_release.c -o ai_module -v -I /usr/include/python3.7/ -L /usr/lib/python3.7 -lpython3.7
我可以得到可执行软件,并且可以成功运行它,但是应用程序在一次调用中被多次调用,如下所示,我无法确定是谁调用它,以及如何防止错误调用。任何人都可以帮助我吗?
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
9970 xx 20 0 2949576 706176 125276 R 80.8 1.1 0:02.44 ai_module
9991 xx 20 0 2316072 211048 112616 R 53.0 0.3 0:01.60 ai_module
终端中的打印信息如下:
usage: ai_module [-h] [--input INPUT_FILEPATH] [--label LABEL_FILE] [--output OUTPUT_FILEPATH]
ai_module: error: unrecognized arguments: -c from multiprocessing.semaphore_tracker import main;main(5)
usage: ai_module [-h] [--input INPUT_FILEPATH] [--label LABEL_FILE] [--output OUTPUT_FILEPATH]
ai_module: error: unrecognized arguments: -c from multiprocessing.semaphore_tracker import main;main(4)
usage: ai_module [-h] [--input INPUT_FILEPATH] [--label LABEL_FILE] [--output OUTPUT_FILEPATH]
解决方案
推荐阅读
- project - Odoo11 - 将用户分配限制为项目团队成员
- pascal - 如何寻找文本文件?
- python - 将 Discord 机器人的默认帮助命令放在一个类别中(Python)
- excel - 在矩阵上查找巧合
- sql - Reporting Services,在算术运算期间出错
- php - 加载带有 jquery 脚本的完整 PHP 文件
- reactjs - 窗口、文档和 $ 未在 reactjs 中定义
- javascript - 通过 React Native 更改图标 activeIndex
- json - 如何在angular4中处理json
- php - 使用 Laravel Storage Facade 存储 SQL 查询