• Liunx 安装basemap


    2. 解压 
       tar -zxvf basemap-1.2.1rel.tar.gz
    3.  安装依赖包
        
        pip  install numpy  -i  https://mirrors.aliyun.com/pypi/simple

      pip install matplotlib -i https://mirrors.aliyun.com/pypi/simple

    pip install pyproj -i https://mirrors.aliyun.com/pypi/simple
        pip  install pyshp  -i  https://mirrors.aliyun.com/pypi/simple
    4. 编译安装 geos 库
       cd basemap-1.2.1rel/geos-3.3.3/
       export GEOS_DIR=/usr/local
        ./configure --prefix=$GEOS_DIR
     
        vim include/geos/platform.h
       改:/* #undef HAVE_ISNAN */
       为:#define HAVE_ISNAN 1
        
        make
        make install
    5. 安装 basemap
        cd  ..
        python setup.py install
          
    6. 测试
        cd examples/
        python simpletest.py
    FROM harbor-test.ecoweather.cn/ytq-datacenter_data-handle/python:3.7
    WORKDIR /home
    COPY . /home
    
    RUN pip install --no-cache-dir -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple 
        && unzip geos-3.8.1.zip 
        && cd geos-3.8.1/ 
        && export GEOS_DIR=/usr/local 
        && chmod 777 ./configure 
        && ./configure --prefix=$GEOS_DIR 
        && make;make install 
        && cd /home 
        && rm -rf geos-3.8.1 
        && apt update  -y 
        && apt-get install build-essential python3-dev libssl-dev libffi-dev libxml2 libxml2-dev libxslt1-dev zlib1g-dev -y
        && pip install basemap-1.2.1rel.tar.gz 
        && rm  basemap-1.2.1rel.tar.gz

     requirements.txt

    pyshp
    pyproj
    numpy
    matplotlib

    参考   https://lumingdong.cn/install-basemap-under-linux.html#comment-201

  • 相关阅读:
    矩阵的运算和分块
    组合数
    二项式定理
    Python 生成 PSK (PSK认证时,PMK就是PSK)
    ruby opposite of any?
    大大的问号之Ruby
    41 KMP子串查找算法
    字符串变量存储位置
    java中wait和notify
    java 动态代理
  • 原文地址:https://www.cnblogs.com/luochunxi/p/12891574.html
Copyright © 2020-2023  润新知