首页 > 编程语言 >python2--安装es报错:error in elastic-transport setup command: 'install_requires' must be a str

python2--安装es报错:error in elastic-transport setup command: 'install_requires' must be a str

时间:2023-01-30 10:11:06浏览次数:48  
标签:requirement -- 报错 transport install pip 安装 es python2

今天使用python2安装es模块时报错:

 

 

原因是pip(模块管理工具)版本过低,需先升级pip,再进行安装

先替换pip的镜像,默认镜像拉取慢,还可能会失败

cd ~;mkdir .pip;touch .pip/pip.conf
cat >> ./.pip/pip.conf <<'EOF'
[global]
index-url = https://mirrors.aliyun.com/pypi/simple/
[install]
trusted-host=mirrors.aliyun.com
EOF

再进行升级

python -m pip install --upgrade pip==20.3.4

最后安装es

python -m pip install elasticsearch

 

标签:requirement,--,报错,transport,install,pip,安装,es,python2
From: https://www.cnblogs.com/Xinenhui/p/17074582.html

相关文章