             return loadPythonLibrary(at: pythonLibraryPath)
         }
         
+        #if canImport(Darwin) || canImport(Glibc)
+        if dlsym(RTLD_DEFAULT, pythonInitializationSymbolName) != nil {
+            return RTLD_DEFAULT
+        }
+        #endif
+        
         for majorVersion in supportedMajorVersions {
             for minorVersion in supportedMinorVersions {
                 for libraryPath in libraryPaths {

            }
        }
        
        #if canImport(Darwin)
        if dlsym(RTLD_SELF, "Py_Initialize") != nil {
            return RTLD_SELF
        }
        #endif
        
        return nil
    }
    

// The `PythonLibrary` struct that loads Python symbols at runtime.
//===----------------------------------------------------------------------===//

var RTLD_DEFAULT = UnsafeMutableRawPointer(bitPattern: -2)

public struct PythonLibrary {
    private static let shared = PythonLibrary()
    private static let pythonLegacySymbolName = "PyString_AsString"
    private static let pythonInitializationSymbolName = "Py_Initialize"
    private static var librarySymbolsLoaded = false
    
    private let pythonLibraryHandle: UnsafeMutableRawPointer
