I use python scripts to generate some data and pass it to typescript with shell api via command.spawn
const command = new Command("run-python", [
path,
String(x0),
String(x1),
String(a),
String(E),
String(V0),
String(m),
String(diracConstant.Js),
])
This works only in dev mode. In production I get some problems with python environment(pic) .I don't use any venv. I thought tauri would handle system commands the same way in dev and production. It seems like a python issue but I can't figure out why this problem doesn't occur in dev mode then.
Shell api is enabled in tauri.conf.json of course
"allowlist": {
"all": false,
"shell": {
"all": false,
"execute": true,
"open": true,
"scope": [
{
"name": "run-python",
"cmd": "python3",
"args": true
}
]
}
Python scripts are added as resource and fs api is enabled
"fs": {
"all": true,
"scope": ["$RESOURCE/python/*"]
},
"bundle": {
"active": true,
"resources": ["python/*"],
I can get scripts paths without a problem in both dev and production using resolveResource
const path = await resolveResource("python/potential_barrier.py")
and overall I don't get any errors related to incorrect path or resource not available.
I would appreciate any help with that problem