Update postgres_impl_test.py
Browse files
lightrag/kg/postgres_impl_test.py
CHANGED
|
@@ -1,8 +1,15 @@
|
|
| 1 |
import asyncio
|
| 2 |
-
import asyncpg
|
| 3 |
import sys
|
| 4 |
import os
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
|
|
|
|
| 6 |
import psycopg
|
| 7 |
from psycopg_pool import AsyncConnectionPool
|
| 8 |
from lightrag.kg.postgres_impl import PostgreSQLDB, PGGraphStorage
|
|
|
|
| 1 |
import asyncio
|
|
|
|
| 2 |
import sys
|
| 3 |
import os
|
| 4 |
+
import pipmaster as pm
|
| 5 |
+
|
| 6 |
+
if not pm.is_installed("psycopg-pool"):
|
| 7 |
+
pm.install("psycopg-pool")
|
| 8 |
+
pm.install("psycopg[binary,pool]")
|
| 9 |
+
if not pm.is_installed("asyncpg"):
|
| 10 |
+
pm.install("asyncpg")
|
| 11 |
|
| 12 |
+
import asyncpg
|
| 13 |
import psycopg
|
| 14 |
from psycopg_pool import AsyncConnectionPool
|
| 15 |
from lightrag.kg.postgres_impl import PostgreSQLDB, PGGraphStorage
|