python38安装jsonpath失败问题解决
python3.8 安装 jsonpath
·
前言
在linux 上安装了python3.8.5环境,pip安装jsonpath的时候一直无法安装成功
遇到问题
运行环境:linux
python环境:3.8.5
pip安装jsonpath
# pip3 install jsonpath
Looking in indexes: http://mirrors.cloud.aliyuncs.com/pypi/simple/
Requirement already satisfied: jsonpath in /root/python3/lib/python3.6/site-packages (0.82)
You are using pip version 18.1, however version 21.3.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
[root@iZ2vchn8sk983jm605yhshZ hrun2_web]# pip38 install jsonpath
Looking in indexes: http://mirrors.cloud.aliyuncs.com/pypi/simple/
Collecting jsonpath
Using cached http://mirrors.cloud.aliyuncs.com/pypi/packages/5f/c0/b54189dfe62f1a93ba294ab53508a81d440fc63adff253db369f557a996a/jsonpath-0.82.tar.gz (9.6 kB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [1 lines of output]
ERROR: Can not execute `setup.py` since setuptools is not available in the build environment.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
一直无法安装成功
解决办法
可以先下载安装包到本地,在本地解压安装
wget http://www.ultimate.com/phil/python/download/jsonpath-0.82.tar.gz
解压文件
tar -xvf jsonpath-0.82.tar.gz
用setup.py安装
# cd jsonpath-0.82
# python38 setup.py install
show查看安装成功
# pip38 show jsonpath
Name: jsonpath
Version: 0.82
Summary: An XPath for JSON
Home-page: http://www.ultimate.com/phil/python/#jsonpath
Author: Phil Budne
Author-email: phil@ultimate.com
License: MIT
Location: /root/python3.8/lib/python3.8/site-packages
Requires:
Required-by:

GitCode 天启AI是一款由 GitCode 团队打造的智能助手,基于先进的LLM(大语言模型)与多智能体 Agent 技术构建,致力于为用户提供高效、智能、多模态的创作与开发支持。它不仅支持自然语言对话,还具备处理文件、生成 PPT、撰写分析报告、开发 Web 应用等多项能力,真正做到“一句话,让 Al帮你完成复杂任务”。
更多推荐
所有评论(0)