Linux Centos安装python相关库失败处理方法

来源:互联网 发布:淘宝淘宝联盟怎么用法 编辑:程序博客网 时间:2024/06/03 15:43

比如安装rasterstats 失败如何解决

  • 方案一、推荐
    (1) 提示缺少 Python.h 文件,执行

    yum install python-devel

    (2) 提示缺少 cpl_conv.h 文件,执行

    yum install gdal-devel

    (3) 提示gcc: error trying to exec ‘cc1plus’: execvp: No such file or directory,执行

    yum install gcc-c++
  • 方案二、安装虚拟环境 conda
    (1) wget https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh
    (2) bash Miniconda2-latest-Linux-x86_64.sh
    (3) 退出重新登录
    (4) conda install rasterio
    (5) pip install rasterstats

0 0
原创粉丝点击