ERROR:sf is not compatible with GDAL version below 2.0.1

在安装monocle3时,出现报错信息如下:

devtools::install_github('cole-trapnell-lab/monocle3')

显示GDAL版本不对,必须得更新到2.0.1以上,于是尝试更新版本。

sudo add-apt-repository -y ppa:ubuntugis/ppa
sudo apt update 
sudo apt upgrade

 但更新版本后,显示版本仍为1.9.2。

gdalinfo --version

考虑到是在conda环境下进行的安装,系统环境更新了但是conda环境下的gdal版本未更新,为验证这一假设,我deactivate了meta2的conda环境,果然如我所料,系统版本更新为2.2.2。

但由于我R的配置都安装在conda环境,如何更新conda环境中的gdal版本呢?尝试了以下解决方案,在conda环境下,使用conda进行安装时,加上conda-forge

conda install -c conda-forge gdal=2.2.2

看一下版本

gdalinfo --version

Reference:

ubuntugis-stable : “UbuntuGIS” team (launchpad.net)

linux - python GDAL 2.1 installation on Ubuntu 16.04 - Stack Overflow

猜你喜欢

转载自blog.csdn.net/qq_42458954/article/details/134715050