I wish to install geopandas with conda, as it is recommended by the manual.
https://geopandas.org/en/stable/getting_started/install.html
I am working on Linux Ubuntu 22.04 LTS with Python 3.7.4. I have tried to install geopandas with the following commands:
conda install geopandas
conda install --channel conda-forge geopandas
conda install python=3 geopandas
But it always end up with this error message:
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: / failed
Another attempt has been made creating an environment:
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 geopandas
And it seems to work. Unfortunately, when trying to import the package in Python, the following error show:
>>> import geopandas
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/usr/anaconda3/lib/python3.7/site-packages/geopandas/__init__.py", line 1, in <module>
from geopandas._config import options # noqa
File "/home/usr/anaconda3/lib/python3.7/site-packages/geopandas/_config.py", line 109, in <module>
default_value=_default_use_pygeos(),
File "/home/usr/anaconda3/lib/python3.7/site-packages/geopandas/_config.py", line 95, in _default_use_pygeos
import geopandas._compat as compat
File "/home/usr/anaconda3/lib/python3.7/site-packages/geopandas/_compat.py", line 8, in <module>
import pandas as pd
File "/home/usr/anaconda3/lib/python3.7/site-packages/pandas/__init__.py", line 142, in <module>
from pandas.io.api import (
File "/home/usr/anaconda3/lib/python3.7/site-packages/pandas/io/api.py", line 8, in <module>
from pandas.io.excel import ExcelFile, ExcelWriter, read_excel
File "/home/usr/anaconda3/lib/python3.7/site-packages/pandas/io/excel/__init__.py", line 1, in <module>
from pandas.io.excel._base import ExcelFile, ExcelWriter, read_excel
File "/home/usr/anaconda3/lib/python3.7/site-packages/pandas/io/excel/_base.py", line 32, in <module>
from pandas.io.parsers import TextParser
File "/home/usr/anaconda3/lib/python3.7/site-packages/pandas/io/parsers/__init__.py", line 1, in <module>
from pandas.io.parsers.readers import (
File "/home/usr/anaconda3/lib/python3.7/site-packages/pandas/io/parsers/readers.py", line 17, in <module>
from pandas._typing import (
ImportError: cannot import name 'DtypeArg' from 'pandas._typing' (/home/usr/anaconda3/lib/python3.7/site-packages/pandas/_typing.py)
Would anyone have an idea what is the problem installing geopandas on my device?