我用的是谷歌可乐。我已经安装了PyGMT。现在,我想安装Geopandas,但是当我输入"!pip install geopandas“或"!conda install geopandas”时,我得到了很多错误。你能帮我在googlecolab中安装geopandas吗?这是我的代码;
from google.colab import drive
drive.mount('/content/drive')
import os
import sys
import os
sys.path.append('/usr/local/lib/python3.8/site-packages')
os.environ["GMT_LIBRARY_PATH"]="/usr/local/lib"!wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
!chmod +x Miniconda3-latest-Linux-x86_64.sh
!bash ./Miniconda3-latest-Linux-x86_64.sh -bfp /usr/local
!conda update conda -y -q
!conda config --prepend channels conda-forge
!conda install -q -y --prefix /usr/local python=3.8 pygmt
import sys
import os
sys.path.append('/usr/local/lib/python3.8/site-packages')
os.environ["GMT_LIBRARY_PATH"]="/usr/local/lib"!pip install geopandasimport pygmt
import pandas as pd
import geopandas

当我这样做的时候!pip安装geopandas并导入它,它显示: ModuleNotFoundError:没有名为'pyproj._network‘的模块

发布于 2021-05-08 05:23:47
默认情况下,Conda在google colab中不可用,就像numpy、pandas等一样。所以使用!conda install geopandas不会有任何帮助。不过,还有另一种方法可以绕过它。您可以在google colab上安装conda,并使用它安装其他软件包。下面是操作步骤:
!pip install -q condacolab
import condacolab
condacolab.install()然后尝试使用!conda install geopandas进行安装并使用import geopandas导入
发布于 2021-03-09 11:51:36
你有没有试过使用
!pip install --upgrade geopandas不要忘了还要更新其他依赖项
!pip install --upgrade pyshp
!pip install --upgrade shapely
!pip install --upgrade descartes在Google Colab教程https://colab.research.google.com/drive/1We-LMiSeucESsiB1tmvL9nZrntyWsri-#scrollTo=xIXl9KBOxVKE中找到了它
希望它能起作用
https://stackoverflow.com/questions/65324533
复制相似问题