iabraham / pyhcp

Using Human Connectome Data with Python for ML
5 stars 1 forks source link

Anaconda needs to link _gdbm #5

Closed iabraham closed 5 years ago

iabraham commented 5 years ago

The shelve module will try to use one of three underlying database implementations: gdbm, ndbm or dumbdbm (see here). When neither gdbm or ndbm is found it falls back to dumbdbm. With dumbdbm implementation, it seems that opening in with the r flag (for read only) seems to have no effect on preventing writes. See this for example. The fix is to use gdbm or ndbm. On MacOS cursory testing shows that ndbm gets used by default (even with Anaconda) whereas on Linux: