core
core copied to clipboard
[Question] python 插件找不到模块应该怎么办?
opensumi 里面的 python 插件找不到我的 python 模块怎么办呀?
我的 python 路径和 opensumi 的安装路径在一起
launch.json 我是这样写的不知道对不对 { // 使用 IntelliSense 了解相关属性。 // 悬停以查看现有属性的描述。 // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ { "name": "Python: 当前文件", "type": "python", "request": "launch", "program": "et_bootstrap", "pythonPath": "D:\xxxxx\python.exe", "console": "integratedTerminal", "env": { "scripts": "${runPythonScripts}", "PYTHONPATH": "D:\xxxxxx\Python37\Lib\et_bootstrap" } } ] }
报错信息
Traceback (most recent call last):
File "D:\workspace\et_upper4\out-x64\Python37\lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "D:\workspace\et_upper4\out-x64\Python37\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "D:\workspace\et_upper4\extensions\ms-python.python\pythonFiles\lib\python\debugpy_main.py", line 45, in
@zhuzeyu22 你这里使用的一些表达式如 ${runPythonScripts}
不支持,需要自行基于 https://github.com/opensumi/core/blob/a53fac57ec78743997f602682e661ba9594ec99e/packages/variable/src/browser/variable-resolver.contribution.ts#L21 拓展支持。
文件路径找不到的问题可能与 Windows 下的路径转换有关系,需要自行排查一下这里逻辑:
https://github.com/opensumi/core/blob/a53fac57ec78743997f602682e661ba9594ec99e/packages/debug/src/browser/debug-session-manager.ts#L363
变量有拓展
此问题已被自动标记为已过时,如果没有进一步的活动,它将被关闭。谢谢您的贡献。 This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.