Python Geopandas Unable to Locate Shapefile

1.1k views Asked by At

Environment:

Python 3.8.6
Conda 4.8.5
Mac OS Catalina 10.15.7

Attempting to read in an ESRI shapefile of UK upper tier local authority boundaries to a python environment. Attempted in both command line and PyCharm with identical error.

Setup following document guidance:

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

I have confirmed all dependency packages (fiona, pyproj, shapely, dumpy, pandas) are installed and imported to environment.

But when running the following:

local_auth_shape = gpd.read_file('~/Downloads/Counties_and_Unitary_Authorities__December_2017__Boundaries_GB-shp/Counties_and_Unitary_Authorities__December_2017__Boundaries_GB.shp')

I am met with the error:

fiona.errors.DriverError: ~/Downloads/Counties_and_Unitary_Authorities__December_2017__Boundaries_GB-shp/Counties_and_Unitary_Authorities__December_2017__Boundaries_GB.shp: No such file or directory

The path is correct and I have triple checked it. The geo database folder has also downloaded without error.

I have attempted using pip install also with the same error.

0

There are 0 answers