简体   繁体   English

安装地理熊猫

[英]Installing geopandas

I've tried installing geopandas, but I keep running into issues.我试过安装 geopandas,但我一直遇到问题。 I've followed the instructions here: https://geopandas.org/install.htm我已按照此处的说明进行操作: https://geopandas.org/install.htm

Trying conda install geopandas in my terminal produced a number of conflicts.在我的终端中尝试conda install geopandas产生了许多冲突。 Similarly with conda install --channel conda-forge geopandas .conda install --channel conda-forge geopandas I just tried我刚试过

conda create -n geo_env
conda activate geo_env
conda config --env --add channels conda-forge
conda config --env --set channel_priority strict
conda install python=3 geopandas

as instructed on the site, and it seemed to install properly, that is I saw the same sort of prompts and output as outlined in the video here .按照网站上的说明,它似乎安装正确,也就是说,我看到了与此处视频中概述的相同类型的提示和 output。

But when I try import geopandas as gpd in my jupyter notebook, I get the error "No module named 'geopandas'".但是当我尝试在我的 jupyter 笔记本import geopandas as gpd时,我收到错误“没有名为 'geopandas' 的模块”。

I'm not super comfortable with the terminal and doing under-the-hood type coding, and I'm not sure how to troubleshoot this.我对终端和引擎盖下的类型编码不太满意,我不知道如何解决这个问题。 It seems that the latter instructions for the install created a new environment?似乎后面的安装说明创建了一个新环境? How can I get Anaconda (or my jupyter notebook) to locate this environment?我怎样才能让 Anaconda(或我的 jupyter notebook)来定位这个环境?

Any help is much appreciated.任何帮助深表感谢。

I'm not quite sure the issues with the conda install.我不太确定 conda 安装的问题。 I was able to install it properly in a new environment in Anaconda-Navigator, but still unable to access it through a jupyter notebook.我能够在 Anaconda-Navigator 的新环境中正确安装它,但仍然无法通过 jupyter notebook 访问它。

However I tried pip install geopandas instead of conda install, and that seems to have worked perfectly.但是我尝试pip install geopandas而不是 conda install,这似乎效果很好。 Funny, since pip install seemed to be discouraged on the geopandas doc site .有趣的是,因为pip installgeopandas 文档站点上似乎不鼓励安装。 Either way, I seem to have geopandas installed properly now!不管怎样,我现在似乎已经正确安装了 geopandas!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM