diff --git a/pyxel/core/__init__.py b/pyxel/core/__init__.py
index <HASH>..<HASH> 100644
--- a/pyxel/core/__init__.py
+++ b/pyxel/core/__init__.py
@@ -4,7 +4,7 @@ def init_module():
     import platform
     import sys
 
-    lib_path = os.path.join(os.path.dirname(__file__), "libpyxelcore")
+    lib_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), "libpyxelcore")
 
     system = platform.system()
     if system == "Darwin":
Changed to use absolute path to load library