You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

CentOS8环境Python3.6.8下安装curl_cffi库失败怎么解决?

如何在Python 3.6.8中成功安装curl_cffi

问题情况

  • Python版本:Python 3.6.8
  • 已尝试的安装命令:
    • pip3 install curl_cffi
    • pip install curl_cffi
      执行上述命令均出现相同错误,需要解决安装问题。

解决方案

1. 指定兼容Python 3.6的curl_cffi版本

curl_cffi的新版本已不再支持Python 3.6,需安装适配的旧版本:

pip install curl_cffi==0.5.10

该版本是最后一批支持Python 3.6的版本,可正常适配安装。

2. 提前安装系统依赖(Linux/macOS)

如果是Linux系统,先安装curl开发库:

# Debian/Ubuntu系列
sudo apt-get install libcurl4-openssl-dev
# CentOS/RHEL系列
sudo yum install libcurl-devel

如果是macOS,通过Homebrew安装:

brew install curl

3. 升级pip到适配版本

Python 3.6适配的pip最高版本为20.2.4,先升级pip:

pip install --upgrade pip==20.2.4

完成后再执行步骤1的安装命令即可。


内容的提问来源于stack exchange,提问作者侯程恩

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.01 16:25:55