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

cannot find _nmtbin module #174

Open
apullen1 opened this issue Jun 27, 2023 · 4 comments
Open

cannot find _nmtbin module #174

apullen1 opened this issue Jun 27, 2023 · 4 comments

Comments

@apullen1
Copy link

I installed pymaster using conda on my laptop in python v3.8.3, and it runs fine. However, I get an error when running it on my supercomputer account (I don't have root access). I have an anaconda environment, and it installs with python v3.8.3 . I've added the pymaster directory to my python path using the command

export PYTHONPATH=$PYTHONPATH:/home/[username]/.conda/pkgs/namaster-1.2.2-py39h2bc24e2_1/lib/python3.9/site-packages/

When I import the pymaster module, I get the following error:

In [1]: import pymaster as nmt

ModuleNotFoundError Traceback (most recent call last)
in
----> 1 import pymaster as nmt

~/.conda/pkgs/namaster-1.2.2-py39h2bc24e2_1/lib/python3.9/site-packages/pymaster/init.py in
48 in the form of HEALPix maps exclusively with RING ordering.
49 """
---> 50 from pymaster import nmtlib as lib # noqa
51 import numpy as np # noqa
52 from pymaster.utils import ( # noqa

~/.conda/pkgs/namaster-1.2.2-py39h2bc24e2_1/lib/python3.9/site-packages/pymaster/nmtlib.py in
11 # Import the low-level C/C++ module
12 if package or "." in name:
---> 13 import _nmtlib
14 else:
15 import _nmtlib

ModuleNotFoundError: No module named '_nmtlib'

The code doesn't seem to be able to find "_nmtbin". Does the problem have to do with pymaster expecting python v3.9 while my machine runs v3.8.3 ? Any help resolving this would be appreciated.

@ShreeHariMittal
Copy link

I'm having the same problem. It's not able to find module '_nmtlib', and I have python 3.10. Not sure if it's a version problem

@damonge
Copy link
Collaborator

damonge commented Dec 11, 2023

Hi both. With apologies for the delay, first of all, can I check if this was installed via pip or conda-forge?

Are you able to find the path to the _nmtlib*.so file?

@ShreeHariMittal
Copy link

Hi. The installation with pip or conda didn't work for me. I installed by setup.py. Within the pymaster library, I do not see a _nmtlib*.so file, I have is nmtlib.py.

@damonge
Copy link
Collaborator

damonge commented May 13, 2024

You may have already fixed this but, in case it helps, you could try installing the latest version in pip (https://pypi.org/project/pymaster/2.0b0/ - currently pre-release, but will move to stable soon).

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