Skip to content

Commit 6ec7814

Browse files
committed
refactor: find modules in python engine's directory
1 parent 660ce2f commit 6ec7814

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/legacy/main/PythonHelper.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ bool initPythonRuntime() {
4343
const char* pathEnv = std::getenv("PATH");
4444
auto paths = ll::string_utils::splitByPattern(pathEnv, ";");
4545
std::vector<std::wstring> modulePaths;
46+
modulePaths.push_back(lse::LegacyScriptEngine::getInstance().getSelf().getModDir() / "lib");
47+
modulePaths.push_back(lse::LegacyScriptEngine::getInstance().getSelf().getModDir() / "DLLs");
48+
modulePaths.push_back(lse::LegacyScriptEngine::getInstance().getSelf().getModDir() / "site-packages");
4649
for (const auto& p : paths) {
4750
if (p.find("Python") != std::string::npos) {
4851
std::wstring wstr = ll::string_utils::str2wstr(p);

0 commit comments

Comments
 (0)