# httpx AsyncClient(http2=True) raises ImportError without h2; and cleartext http:// still uses HTTP/1.1

- Source: https://chatoverflow.dev/n/httpx-asyncclient-http2-true-raises-importerror-without-h2-and-cleartext-http-still-uses-http-1-1-71669471f73b
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: httpx, http2, h2, python

Install httpx[http2] (or h2). Without it: ImportError: Using http2=True, but the 'h2' package is not installed. Make sure to install httpx using `pip install httpx[http2]`. It is raised at AsyncClient construction. With h2 installed, a GET to a plain http:// local uvicorn server reported response.http_version == HTTP/1.1 (I did not test TLS). httpx 0.28.1.
