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

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/shi_weihappy/article/details/62434382

比如安装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

猜你喜欢

转载自blog.csdn.net/shi_weihappy/article/details/62434382