使用Conda搭建GDAL环境

 

安装Python环境

 

  1. 下载python-3.13.2-amd64.exe
  2. 双击python-3.13.2-amd64.exe,勾选Add python.exe to PATH
  3. 安装直到完成
验证Python环境是否正常:打开cmd命令行,并输入命令
python --version

验证python的结果

 

 

安装Conda环境

 

  1. 下载Miniconda3-latest-Windows-x86_64.exe
  2. 双击Miniconda3-latest-Windows-x86_64.exe
  3. 安装直到完成

 安装GDAL和Spatialite

 

从开始菜单打开打开Anaconda Prompt工具

 

添加包源:默认的源经常下载失败

复制代码
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/

-- 显示源信息
conda config
--set show_channel_urls yes

--清理缓存,非必需
conda clean --all

复制代码

创建环境gdal_env

 

conda create -n gdal_env python=3.13.2

 

 

 

激活 gdal_env 环境

conda activate gdal_env

 

安装GDAL和libspatialite

conda install -c conda-forge gdal libspatialite

验证是否安装成功

gdalinfo --version

conda list gdal

conda list libspatialite

 

posted @   xingtian  阅读(8)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· 记一次.NET内存居高不下排查解决与启示
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· .NET10 - 预览版1新功能体验(一)
点击右上角即可分享
微信分享提示