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

Error with .dbm on some linux machines #11

Open
ChrisgKent opened this issue Nov 7, 2024 · 4 comments
Open

Error with .dbm on some linux machines #11

ChrisgKent opened this issue Nov 7, 2024 · 4 comments

Comments

@ChrisgKent
Copy link
Member

Passes CI on some linux machine, but causes issues with others.

ModuleNotFoundError: No module named '_dbm'

@antem
Copy link

antem commented Dec 10, 2024

I have this issue as well.
Machine: 22.04.1-Ubuntu using a new mamba environment with Python 3.11.

primalscheme3 --help
Traceback (most recent call last):
File "/home/user/miniforge3/envs/primalscheme3/bin/primalscheme3", line 3, in
from primalscheme3.cli import app
File "/home/user/software/primalscheme3/primalscheme3/cli.py", line 12, in
from primalscheme3.core.msa import parse_msa
File "/home/user/software/primalscheme3/primalscheme3/core/msa.py", line 7, in
from primalscheme3.core.classes import FKmer, PrimerPair, RKmer
File "/home/user/software/primalscheme3/primalscheme3/core/classes.py", line 5, in
from primalscheme3.core.mismatches import MatchDB
File "/home/user/software/primalscheme3/primalscheme3/core/mismatches.py", line 1, in
import dbm.ndbm
File "/home/user/miniforge3/envs/primalscheme3/lib/python3.11/dbm/ndbm.py", line 3, in
from _dbm import *
ModuleNotFoundError: No module named '_dbm'

@tiantian123
Copy link

I meet this issue too. and I tried to solve this problem from

https://stackoverflow.com/questions/63525554/no-module-named-gdbm

It worked with the follows command:
sudo cp /usr/lib/python3.10/lib-dynload/_dbm.cpython-310-x86_64-linux-gnu.so /usr/lib/python3.11/lib-dynload/_dbm.cpython-311-x86_64-linux-gnu.so
sudo cp /usr/lib/python3.10/lib-dynload/_gdbm.cpython-310-x86_64-linux-gnu.so /usr/lib/python3.11/lib-dynload/_gdbm.cpython-311-x86_64-linux-gnu.so

@ChrisgKent
Copy link
Member Author

Thank you. It's great there is a working solution!

It's annoying it's a python installation issue. I don't really want to include general instructions for people to mess with their python installations.

In the short term I'll release a working docker image, so people can still use it, while I work on a refactor to remove this dependancy.

I'll leave the issue open so people can find this!

@tiantian123
Copy link

tiantian123 commented Dec 12, 2024 via email

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

3 participants