basemap-data-hires not found despite being installed
Asked Answered
T

1

2

I have the same problem as this post: Declaring a var usable by another function using a import in a secondary script, but the answer does not work on my side. For context: basemap and basemap-data-hires are installed, yet when using resolution = 'f' it triggers the following error:

OSError: Unable to open boundary dataset file. Only the 'crude' and  'low',
resolution datasets are installed by default.
If you are requesting an, 'intermediate', 'high' or 'full'
resolution dataset, you may need to download and install those
files separately with
conda install -c conda-forge basemap-data-hires.

Here is the conda list output:

C:\Users\AlxndrLhr>conda list
# packages in environment at C:\Users\AlxndrLhr\Anaconda3\envs\map:
#
# Name                    Version                   Build  Channel
basemap                   1.2.2            py39h689385a_5    conda-forge
basemap-data              1.3.2              pyhd8ed1ab_0    conda-forge
basemap-data-hires        1.3.2              pyhd8ed1ab_0    conda-forge

As you can see, basemap-data-hires is present. I tried installing it in the base environment of conda, didn't work either.

Trickery answered 30/5, 2022 at 3:23 Comment(0)
S
4

Before basemap 1.3.0, the library was packaged in conda-forge by splitting the heavy data files into a separate basemap-data-hires conda package (and whose files were installed in the share folder).

Since basemap 1.3.0, a complete reorganisation of the basemap package has been done upstream by splitting the library into basemap, basemap-data and basemap-data-hires. These three packages are Python packages and get installed in the corresponding Python site-packages folder. This new structuring is propagated to the conda-forge packages.

Your installation is mixing the old basemap conda package (pre-1.3.0) with the new basemap-data-hires conda package (post-1.3.0). You can solve the issue by pinning versions during installation, either the following to install the latest basemap:

conda install "basemap>=1.3.0" "basemap-data-hires>=1.3.0"

or the following to install the pre-1.3.0 version:

conda install "basemap==1.2.2" "basemap-data-hires==1.2.2"
Statics answered 1/6, 2022 at 14:56 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.