pip freeze
# python -V
# Python 2.7.5
刚开始直接pip install httpx,未设置版本号,因已有idna==2.7,所以出现版本不兼容的现象
anyio 3.0.0 requires idna>=2.8, but you have idna 2.7 which is incompatible.
尝试过后,选择anyio==1.3.0
pip install anyio==1.3.0
安装httpcore
httpcore 0.13.7 requires anyio==3.*, but you have anyio 1.3.0 which is incompatible.
httpx 0.18.0 requires httpcore<0.14.0,>=0.13.0, but you have httpcore 0.10.0 which is incompatible.
设置httpcore==0.13.0
pip install httpcore==0.13.0
pip install httpx==0.18.0
在本地未安装这个包,程序就能运行,在jumpserver中不安装时出现以下错误
Using http2=True, but the 'h2' package is not installed. Make sure to install httpx using `pip install httpx[http2]`.
pip install httpx[http2]