pycharm 安装gdal问题

1.用pycharm安装gdal库失败(settings-project interpreter-‘+’-搜索gdal-安装):

因为比较懒,想直接从pycharm上安装库

利用官网网站:

ERROR: Command errored out with exit status 1:
proposed solution:Try to run this command from the system terminal. Make sure that you use the correct version of ‘pip’ installed for your Python interpreter located at ‘D:\python\python.exe’.
提示你pip版本太旧了,更新之后还是不行

利用国内镜像网站:

还是不行

2.网上查资料,需要安装anaconda

参考这位老哥的教程, anaconda 简介与安装及其配置
然后利用pip 安装gdal
1.下载gdal gdal
2.将安装包放入anaconda文件夹\scripts下
3.CMD 下pip安装 gdal(如果提醒你要更新pip,你发现更新之后还是会报错
:module object is not callable,此时是因为有更新后有两个版本的pip,使用python -m pip uninstall pip命令卸载一个就好,此时再次安装gdal,安装完成,但是有warning:pip is configured with locations that require TLS/SSL。。。。。
不是很影响)
4.运行,正常运行

总结:可能安装gdal需要先安装anaconda,然后在anaconda解释器下才能用。这次也了解到了虚拟环境的作用,当我们做不同的程序需要不同版本的库时,通过虚拟环境不再需要卸了再装,同一种库可以在不同的虚拟环境中表现为不同的版本,使得应用更加灵活。
在这里插入图片描述

发布了24 篇原创文章 · 获赞 8 · 访问量 2175

猜你喜欢

转载自blog.csdn.net/weixin_44839513/article/details/103153357