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

Could not import the C extension for the projected correlation function. #316

Open
suhani0603 opened this issue Apr 9, 2024 · 5 comments

Comments

@suhani0603
Copy link

suhani0603 commented Apr 9, 2024

I installed corrfunc using the instructions provided in https://corrfunc.readthedocs.io/en/master/install.html

##--- this is my script to compute the correlation function
import numpy as np
import Corrfunc
from Corrfunc.theory import *
from Corrfunc.theory.xi import xi

file_halos = np.loadtxt('m_xyz.dat')

boxsize=1024
nthreads = 4
x = file_halos[:,1]
y = file_halos[:,2]
z = file_halos[:,3]

rmin = 0.1

rmax = 20.0

nbins = 20

rbins = np.logspace(np.log10(rmin), np.log10(rmax), nbins + 1)

results_xi = xi(boxsize, nthreads, rbins, x, y, z)

I am getting the following error: Could not import the C extension for the projected correlation function.

I am using Python 3.9.18
numpy 1.26.4
conda 24.3.0

Thank you in advance :)

@manodeep
Copy link
Owner

manodeep commented Apr 9, 2024

Thank you for using Corrfunc and also reporting the issue!

There are a few things that might be going wrong but will need a bit more info to check. Will you please provide the following:

  • what operating system and compiler are you using
  • the output of compiler —version
  • The output of python —version
  • the entire output from python -m pip install -e . —verbose (might want to redirect to a log file and then attach the log file)
  • confirm that the python used in installing is the same python you trying to import Corrfunc into

That should (hopefully) give us some insight into what might be going wrong

@suhani0603
Copy link
Author

suhani0603 commented Apr 10, 2024 via email

@lgarrison
Copy link
Collaborator

@suhani0603 GitHub doesn't allow attachments over email, unfortunately. Could you attach the log file directly to a comment on this issue?

@manodeep
Copy link
Owner

manodeep commented May 2, 2024

@suhani0603 Did you still need help on this?

@suhani0603
Copy link
Author

suhani0603 commented May 16, 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