Skip to content

Commit da0c3af

Browse files
committed
fix: fix pythonhelper
1 parent 2c6eef9 commit da0c3af

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/legacy/main/PythonHelper.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,12 @@ bool pythonInited = false;
4343

4444
bool initPythonRuntime() {
4545
if (!pythonInited) {
46-
script::py_interop::setPythonHomePath(lse::getSelfPluginInstance().getPluginDir());
46+
script::py_interop::setPythonHomePath(lse::getSelfPluginInstance().getModDir());
4747
script::py_interop::setModuleSearchPaths({
48-
lse::getSelfPluginInstance().getPluginDir() / "python310.zip",
49-
lse::getSelfPluginInstance().getPluginDir() / "DLLs",
50-
lse::getSelfPluginInstance().getPluginDir() / "Lib",
51-
lse::getSelfPluginInstance().getPluginDir() / "site-packages",
48+
lse::getSelfPluginInstance().getModDir() / "python310.zip",
49+
lse::getSelfPluginInstance().getModDir() / "DLLs",
50+
lse::getSelfPluginInstance().getModDir() / "Lib",
51+
lse::getSelfPluginInstance().getModDir() / "site-packages",
5252
});
5353
pythonInited = true;
5454
}
@@ -231,8 +231,8 @@ bool processConsolePipCmd(const std::string& cmd) {
231231
// (./plugins/legacy-script-engine/lib/python-env/Lib/site-packages)
232232
int executePipCommand(std::string cmd) {
233233
if (cmd.find("--disable-pip-version-check") == std::string::npos) cmd += " --disable-pip-version-check";
234-
cmd = ll::string_utils::u8str2str((lse::getSelfPluginInstance().getPluginDir() / "python.exe").u8string()) + " -m"
235-
+ cmd;
234+
cmd =
235+
ll::string_utils::u8str2str((lse::getSelfPluginInstance().getModDir() / "python.exe").u8string()) + " -m" + cmd;
236236

237237
SECURITY_ATTRIBUTES sa;
238238
sa.nLength = sizeof(SECURITY_ATTRIBUTES);

0 commit comments

Comments
 (0)