diff --git a/lite/api/python/setup_mac.py.in b/lite/api/python/setup_mac.py.in index b4d53e8400ecf06c59951478817e20421e04ee82..a0f22331fbdce01c2093f5279899b99388dcee3f 100644 --- a/lite/api/python/setup_mac.py.in +++ b/lite/api/python/setup_mac.py.in @@ -47,7 +47,7 @@ if '${WITH_MKL}' == 'ON': PACKAGE_DATA['paddlelite.libs'] += ['libmklml.dylib', 'libiomp5.dylib'] # link lite.so to paddlelite.libs -COMMAND = "install_name_tool -id \"@loader_path/libs/\" ${PADDLE_BINARY_DIR}\ +COMMAND = "install_name_tool -add_rpath \"@loader_path/libs/\" ${PADDLE_BINARY_DIR}\ /inference_lite_lib/python/install/lite/lite.so" if os.system(COMMAND) != 0: raise Exception("patch third_party libs failed, command: %s" % COMMAND)