**
Python 安装Datetime包osgeo的安装
** Datetime包
1.Datetime包的安装失败
2.cmd命令行
注意 包名拼写正确!!!
参考博文https://blog.csdn.net/JineD/article/details/124774570
这时候根据No module named ’ 安装包名字’ 百度查解决方法,方法有很多,比如
方法一:pip install 安装包名字
方法二:python -m pip install 安装包名字
方法三:pip --trusted-host pypi.python.org install 安装包名字
这时候部分人会解决,但是还是会出现新的报错
Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘SSLError(SSLEOFError(8, ‘EOF occurred in violation of protocol (_ssl.c:852)’),)’: /simple/six/
Could not fetch URL https://pypi.org/simple/six/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host=‘pypi.org’, port=443): Max retries exceeded with url: /simple/six/ (Caused by SSLError(SSLEOFError(8, ‘EOF occurred in violation of protocol (_ssl.c:852)’),)) - skipping
Could not find a version that satisfies the requirement 安装包名字(from versions: )
No matching distribution found for 安装包名字
接着继续根据Could not find a version that satisfies the requirement 安装包名字 查问题
会提示换成国内的pip源 可以解决问题
方法一:pip install 安装包名字 -i http://pypi.doubanio.com/simple/ --trusted-host pypi.doubanio.com //豆瓣镜像网站
方法二:pip install 安装包名字 -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com //豆瓣
方法三:pip install 安装包名字 -i https://pypi.tuna.tsinghua.edu.cn/simple/ --trusted-host pypi.tuna.tsinghua.edu.cn //清华大学
还有下面几个国内pip 源,大家可以依次按照上面的方法试下
1)http://mirrors.aliyun.com/pypi/simple/ 阿里云
2)https://pypi.mirrors.ustc.edu.cn/simple/ 中国科技大学
3) http://pypi.mirrors.ustc.edu.cn/simple/ 中国科学技术大学
pip install datatime-i http://pypi.mirrors.ustc.edu.cn/simple/
参考博文
https://blog.csdn.net/weixin_44098853/article/details/106496794
解决方法:
使用命令:pip install -i https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna.tsinghua.edu.cn 包名(国内镜像)
2**.安装osgeo**
1)GDAL安装
[参考博文]
(https://blog.csdn.net/mojie002/article/details/112915275)
得先安装GDAL,而GDAL的安装要从官网下载对应Python版本的包。
GDAL安装包网页 https://pypi.org/project/GDAL/3.6.1/#files
上面下载的不是.whl文件,我也不知道有什么用。
python模块GDAL各版本whl国内下载地址汇总 ,这个链接需要花费一些money,不推荐。
https://gdal.org/download.html#windows 这里是gdal-3.6.1.tar.gz.md5单个文件,不推荐。
gdal的whl文件下载 找了好久才找到能下载到的网址。
安装到python软件安装目录下的,一个叫做scripts的文件夹里。把上一步下载出来的文件(whl格式,数量1个)剪切到这个文件夹里。然后准备安装。
我电脑的Python位置:C:\Users\wangfang\AppData\Local\Programs\Python\Python36
在scripts 文件位置名这里 全部换成cmd 回车 在出来的命令提示符那里输入
pip install 下载安装包名字.whl
但安装失败。
我下载 的gdal,根据自已的python 版本不能看前面的3.6.1而是cp后面的38,39才是版本号。
2.python安装
可能是我的Python版本太低(3.6.1),找不到相对应的.whl文件,更新python。
python安装包链接
Python安装参考博文
查看python版本号教程博文
安装过python 时点击python安装包时出现这个界面。
这是第一次安装时出现的界面。
全选
安装完成
cmd 输入 python 查看版本号是否更新。
ctrl+z后,回车即退出Python环境。再次输入 pip
测试一下pip是否安装完毕。
3.再次安装gdal 包
根据python 版本号下载相应的GDAL的whl文件。找了3.8.2的*安装还是不行,找了3.7.3的成了。