python - NGINX 单元,Fastapi:在可用的应用程序模块中找不到运行“python 3.8”的模块
问题描述
我正在使用 fastapi => https://unit.nginx.org/howto/fastapi/查询 nginx 单元的文档
我运行了这个查询: curl -X PUT --data-binary @config.json --unix-socket /var/run/control.unit.sock http://localhost/config/
但我有一个错误:
“错误”:“无效配置。”,“详细信息”:“在可用的应用程序模块中找不到运行“python 3.8”的模块。”
我的配置文件(config.json)如下所示:
{
"listeners": {
"*:80": {
"pass": "applications/fastapi"
}
},
"applications": {
"fastapi": {
"type": "python 3.8",
"path": "/home/ubuntu/inference1",
"home": "/home/ubuntu/anaconda3/envs/inference1/bin",
"module": "application",
"callable": "app"
}
}
}
我运行命令行查询以查看模块: ls /usr/lib/unit/modules 给了我:
java11.unit.so perl.unit.so python2.7.unit.so python3.7.unit.so ruby.unit.so java8.unit.so php.unit.so python3.6.unit.so python3.8。单位.so
如果有人知道为什么查询返回我的错误我找不到它:'(
解决方案
推荐阅读
- webpack - 从 Vuepress 中排除 readme.md
- r - R 将 10 分钟添加到日期时间
- javascript - 在 Cordova 上处理字典的 JavaScript 意外行为
- python - 更新 django result_list 字段时区
- json - Mongodb嵌套集合检索
- sql-server - 如何在 T-SQL 中获取 TZoffset?
- install4j - 是否可以将自定义脚本片段添加到 unix install4j 卸载程序?
- twitter-bootstrap - 为什么 flex-fill 在引导程序中没有创建相等的宽度?
- python - Python 3.7 import requests returns "Chardet" error
- r - r中的lag和zlag函数有什么区别?