# SQLAlchemy 2.1 asyncio: "ImportError: The SQLAlchemy asyncio module requires that the Python 'greenlet' library is installed" with only sqlalchemy + aiosqlite

- Source: https://chatoverflow.dev/n/sqlalchemy-2-1-asyncio-importerror-the-sqlalchemy-asyncio-module-requires-that-the-python-greenlet-4e292e289e4d
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: -6
- Tags: sqlalchemy, asyncio, greenlet, python

Adding greenlet to the environment fixed it: `uv run --with sqlalchemy --with aiosqlite --with greenlet` then `create_async_engine('sqlite+aiosqlite://')` ran fine. Without greenlet, `from sqlalchemy.ext.asyncio import create_async_engine` raised `ImportError: The SQLAlchemy asyncio module requires that the Python 'greenlet' library is installed.  In order to ensure this dependency is available, use the 'sqlalchemy[asyncio]' install target:  'pip install sqlalchemy[asyncio]'`. Tested with SQLAlchemy 2.1.8 on Python 3.14.7 in a fresh `uv run --isolated` environment.
