# ISSM Python interface discussion

**URL:** https://forum.access-hive.org.au/t/issm-python-interface-discussion/4505
**Category:** Cryosphere
**Tags:** issm
**Created:** [14 May 2025 03:40 UTC](https://forum.access-hive.org.au/t/issm-python-interface-discussion/4505 "2025-05-14T03:40:40Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![justinh2002](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.access-hive.org.au/justinh2002/32/2853_2.png) [@justinh2002](https://forum.access-hive.org.au/u/justinh2002)
#### Post date: [14 May 2025 03:40 UTC](https://forum.access-hive.org.au/t/issm-python-interface-discussion/4505/1 "2025-05-14T03:40:40Z")

</div>

Documenting issues users might face with the Python interface of ISSM below

---

<div class="post-metadata">

### Author: ![justinh2002](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.access-hive.org.au/justinh2002/32/2853_2.png) [@justinh2002](https://forum.access-hive.org.au/u/justinh2002)
#### Post date: [14 May 2025 04:00 UTC](https://forum.access-hive.org.au/t/issm-python-interface-discussion/4505/2 "2025-05-14T04:00:13Z")

</div>

Python netCDF4 might be linked and compiled to the wrong HDF5 library (should be brew installed), multiple issues can stem from this. Switching formats in the code only shuffles the symptom.

You need to reinstall netCDF4 so that it finds a working HDF5 on your Mac. For example, if you’re using Homebrew, first install HDF5 and netCDF4:

`brew install hdf5 netcdf`  
Then, rebuild the Python binding so it links to the new HDF5:  
`pip uninstall netCDF4`  
now force a source install against your brew‑installed HDF5,

```auto
HDF5_DIR=$(brew --prefix hdf5) \
pip install --no-binary netCDF4 netCDF4

```

In Python, now test:  
`from netCDF4 import Dataset`  
`Dataset `  
\<class ‘netCDF4.\_netCDF4.Dataset’\>`

After that something like:  
`NCData = Dataset(filename, 'w', format='NETCDF4')`  
will succeed and you’ll be able to write out the file.
