• python38安装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: 
    
  • 相关阅读:
    Mac下mysql出现错误:ERROR 1055 (42000)
    单表查询
    外键的变种 三种关系
    Java8中Lambda表达式详解
    Java中的比较器Comparable、Comparator
    Java创建线程的方法
    java日期格式化
    Docker容器如何修改hosts
    使用postman可以正常访问,但是在应用中返回415状态码
    使用tcpdump进行抓包
  • 原文地址:https://www.cnblogs.com/yoyoketang/p/16457801.html
Copyright © 2020-2023  润新知