diff --git a/scripts/anilistUpdater/main.lua b/scripts/anilistUpdater/main.lua
index 07dee7e..14ee38c 100644
--- a/scripts/anilistUpdater/main.lua
+++ b/scripts/anilistUpdater/main.lua
@@ -15,13 +15,30 @@ function callback(success, result, error)
 end
 
 local function get_python_command()
+	-- Determine OS type
 	local os_name = package.config:sub(1, 1)
+
+	-- Get the path to this Lua file
+	local info = debug.getinfo(1, "S")
+	local script_path = info.source:sub(info.source:find("@") == 1 and 2 or 1)
+
+	-- Extract the directory containing this file
+	local script_dir
 	if os_name == "\\" then
 		-- Windows
-		return "python"
+		script_dir = script_path:match("(.+)\\[^\\]+$") or "."
 	else
-		-- Linux
-		return "python3"
+		-- Unix
+		script_dir = script_path:match("(.+)/[^/]+$") or "."
+	end
+
+	-- Build absolute path to the Python executable in the virtual environment
+	if os_name == "\\" then
+		-- Windows
+		return script_dir .. "\\env\\Scripts\\python.exe"
+	else
+		-- Unix
+		return script_dir .. "/env/bin/python3"
 	end
 end