     static var libraryVersionSeparator = ""
     #endif
     
+    private static var isPythonLibraryPreloaded: Bool {
+        return self.loadSymbol(RTLD_DEFAULT, self.pythonInitializeSymbolName) != nil
+    }
+
     static let libraryPaths: [String] = {
         var libraryPaths: [String] = []
         for librarySearchPath in librarySearchPaths {

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

public struct PythonLibrary {
    private static let shared = PythonLibrary()

        }
        return libraryPaths
    }()
        
    static func loadPythonLibrary() -> UnsafeMutableRawPointer? {
        if self.isPythonLibraryPreloaded {
            return RTLD_DEFAULT
        }
        else if let pythonLibraryPath = Environment.library.value {
            return self.loadPythonLibrary(at: pythonLibraryPath)
