Sebastian
Sebastian

Reputation: 972

Can't install geopandas with anaconda because of conflicts

I'm a beginner and I try to follow a tutorial. So I install a anaconda and next step I should install geopandas but I get this messages:

conda install geopandas
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: \

...

https://pastebin.com/c2cmmhrr

I try to install anaconda again and again but nothing works...

Upvotes: 10

Views: 10003

Answers (4)

oil_lamp
oil_lamp

Reputation: 552

As Sebastian mentioned in previous comments, the following worked for me.

First run:
conda update --all

Then run:
conda install -c conda-forge geopandas

Upvotes: 0

Msalman
Msalman

Reputation: 93

As NateBates mentioned you need to install the dependencies, but conda forge has already taken care of that for you so just run:

conda install -c conda-forge geopandas

Upvotes: 0

zelfde
zelfde

Reputation: 320

Here's an answer that worked for me, after more trouble than I want to get into.

Create conda environment

https://medium.com/@nrk25693/how-to-add-your-conda-environment-to-your-jupyter-notebook-in-just-4-steps-abeab8b8d084

Install Dependencies(Preparing for Battle)

GeoPandas depends on the following Python libraries:  pandas, Shapely, Fiona, pyproj, NumPy, six, descartes, and cartopy.

Go to https://anaconda.org/conda-forge/ and search for a Dependency. Click on the first Dependency name of the first row (Example: pandas - in green next to 1.3.1, below)enter image description here

That will take you to a new page. Scroll down, then copy and paste the first line of code (Example higlighted).enter image description here

Paste that into your Terminal in your newly-made conda environment and hit Enter.

Once all of the Dependencies have been successfully added in this manner, copy the Geopandas line of code from the conda forge page just as you did for the Dependencies. Paste it in your terminal and hit Enter. If the Gods of not-suck are with you, it will install.

Let me know when this works and if you need some good resources for how to use Geopandas

Upvotes: 1

Jonathan
Jonathan

Reputation: 175

Maybe trivial for more experienced, but I still struggle with this. I got same when naively trying to install it using the base, if you're installing using the base (root) environment, you can't. (I don't know why.) You need to create your environment by clicking 'Environments' and in 'Create' on Anaconda Navigator or

conda create --name myenv
conda activate myenv

on terminal. I cannot really elaborate, but you should not install your packages in the base (root). You actually should do stuff and packages installed in your environment.

Upvotes: 6

Related Questions