Rosemeis / pcangsd

Framework for analyzing low depth NGS data in heterogeneous populations using PCA.
GNU General Public License v3.0
46 stars 11 forks source link

No module named 'reader_cy' #54

Closed DcornishUCL closed 3 years ago

DcornishUCL commented 3 years ago

Hi,

I am trying to run PCAngsd however when I do so, I receive the error:

Traceback (most recent call last): File "/bin/pcangsd/pcangsd.py", line 138, in import reader_cy ModuleNotFoundError: No module named 'reader_cy'

I am running PCAngsd using python3/3.9, cython-0.29.24 and numpy-1.21.2 if this helps narrow down the issue. Any help to rectify or find the source of this error would be much appreciated.

Best,

Dean

Rosemeis commented 3 years ago

Hi Dean,

It looks like you haven't compiled the cython files. In the pcangsd folder, use the following command: python setup.py build_ext --inplace

Let me know if it works. :-)

Best, Jonas

DcornishUCL commented 3 years ago

Thanks, for your suggestion, this seems to get rid of the previous error and now I get:

Traceback (most recent call last): File "/bin/pcangsd/pcangsd.py", line 139, in import shared File "/bin/pcangsd/shared.py", line 12, in import shared_cy ImportError: /bin/pcangsd/shared_cy.cpython-39-x86_64-linux-gnu.so: undefined symbol: __intel_sse2_strlen

Rosemeis commented 3 years ago

Hmm, it seems to be related to an Intel compiler. Sorry I have not seen this before but this might be of help: https://stackoverflow.com/questions/37905210/how-to-override-pythons-distutils-gcc-linker-with-icc

DcornishUCL commented 3 years ago

Hi,

I was able to fix this with the simple solution in: https://stackoverflow.com/questions/42611515/undefined-symbol-intel-sse2-strcpy just do export CC=gcc before compiling. Thank you for helping me with this :)

ljchueca commented 2 years ago

Hi! I had the same issue as Dean. I tried to reply all the solution posted here but still I have the same error. I would appreciate any suggestion to fix it.

PCAngsd v.1.10. Jonas Meisner and Anders Albrechtsen. Using 20 thread(s).

Traceback (most recent call last): File "/cluster/home/s_lchueca/programs/pcangsd/pcangsd/pcangsd.py", line 455, in main() File "/cluster/home/s_lchueca/programs/pcangsd/pcangsd/pcangsd.py", line 148, in main from pcangsd import reader_cy ImportError: cannot import name 'reader_cy' from 'pcangsd' (/cluster/home/s_lchueca/programs/pcangsd/pcangsd/pcangsd.py)

Best, Luis

Rosemeis commented 2 years ago

Hi Luis,

Could you try to follow these steps #61

Best, Jonas

HarryArthurMarchant commented 2 years ago

Hi,

I'm trying to run PCAngsd on WSL: Ubuntu-22.04 in VS code but keep getting this error:

Traceback (most recent call last): File "Bioinformatics/pcangsd/pcangsd/pcangsd.py", line 455, in main() File "Bioinformatics/pcangsd/pcangsd/pcangsd.py", line 148, in main from pcangsd import reader_cy ImportError: cannot import name 'reader_cy' from 'pcangsd' (/Bioinformatics/pcangsd/pcangsd/pcangsd.py)

Any solution to this error would be much appreciated.

Best,

Harry