10

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...

AMC
  • 2,642
  • 7
  • 13
  • 35
Sebastian
  • 952
  • 1
  • 14
  • 41
  • 1
    Solver errors are unfortunately often nasty and not so easy to solve. I would first check your channel_priority: `conda config --show channel_priority` - if it is not set to `flexible`, I would try changing it to flexible. – cel Apr 24 '20 at 21:45
  • is set to flexible – Sebastian Apr 25 '20 at 10:02
  • 1
    Next, I would try whether `conda update --all --dry-run` works or also gives solver errors. If it also does not work, I would check `conda list` for packages from channels other than `conda-forge` and `defaults`. They may have incompatibilities. – cel Apr 25 '20 at 10:17
  • channels are like py37_0 and py_0 dont know I'm really new to this. and its a fresh install of anaconda – Sebastian Apr 25 '20 at 10:20
  • 2
    conda update --all and after that I installation worked... – Sebastian Apr 25 '20 at 14:43
  • 1
    Please share the contents of the environment. You wouldn't happen to be using the base environment for this, would you? – AMC Apr 26 '20 at 22:47

4 Answers4

4

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.

Jonathan
  • 133
  • 1
  • 15
1

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

zelfde
  • 300
  • 2
  • 13
0

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
MD Mushfirat Mohaimin
  • 1,966
  • 3
  • 10
  • 22
Msalman
  • 63
  • 1
  • 3
0

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

First run:
conda update --all

Then run:
conda install -c conda-forge geopandas

oil_lamp
  • 482
  • 7
  • 9