Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Anaconda needs to link _gdbm #5

Closed
iabraham opened this issue Mar 24, 2019 · 0 comments
Closed

Anaconda needs to link _gdbm #5

iabraham opened this issue Mar 24, 2019 · 0 comments

Comments

@iabraham
Copy link
Owner

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:

  • You need to do: sudo apt-get install python3-gdbm to install the module and then
  • Manually link the library. See this answer for details.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant