Jumpserver中安装httpx

  1. 查看已安装的包
pip freeze
# python -V
# Python 2.7.5
  1. 安装anyio

刚开始直接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

在这里插入图片描述

  1. 安装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

在这里插入图片描述

  1. 安装httpx
pip install httpx==0.18.0

在这里插入图片描述

  1. 安装httpx[http]

在本地未安装这个包,程序就能运行,在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]

在这里插入图片描述

相关推荐

  1. Docker下安装jumpserver

    2024-01-20 00:02:03       28 阅读

最近更新

  1. TCP协议是安全的吗?

    2024-01-20 00:02:03       18 阅读
  2. 阿里云服务器执行yum,一直下载docker-ce-stable失败

    2024-01-20 00:02:03       19 阅读
  3. 【Python教程】压缩PDF文件大小

    2024-01-20 00:02:03       18 阅读
  4. 通过文章id递归查询所有评论(xml)

    2024-01-20 00:02:03       20 阅读

热门阅读

  1. 介绍 TensorFlow 的基本概念和使用场景

    2024-01-20 00:02:03       36 阅读
  2. 电阻式电流采样不准?(下篇)

    2024-01-20 00:02:03       39 阅读
  3. 【温故而知新】HTML5的Web Worker

    2024-01-20 00:02:03       40 阅读
  4. 面试 React 框架八股文十问十答第十二期

    2024-01-20 00:02:03       36 阅读
  5. LeetCode刷题——55. 跳跃游戏(HOT100)

    2024-01-20 00:02:03       41 阅读
  6. Spring 事件推送publishEvent

    2024-01-20 00:02:03       38 阅读