Rosemeis / pcangsd

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

ImportError: cannot import name 'reader_cy' from pcangsd #69

Closed ashno376 closed 1 year ago

ashno376 commented 1 year ago

Hi

I am having an issue running PCangsd on a HPC linux environment. I am getting the error:

Traceback (most recent call last): File "/mnt/scratch/nodelete/c1769413/bin/conda/bin/pcangsd/pcangsd/pcangsd.py", line 476, in main() File "/mnt/scratch/nodelete/c1769413/bin/conda/bin/pcangsd/pcangsd/pcangsd.py", line 148, in main from pcangsd import shared ImportError: cannot import name 'shared' from 'pcangsd' (/mnt/scratch/nodelete/c1769413/bin/conda/bin/pcangsd/pcangs/pcangsd.py)

I have tried:

removing and reinstalling pcangsd according to the following steps:

  1. conda install -c conda-forge c-compiler
  2. conda install -c conda-forge cxx-compiler
  3. git clone https://github.com/Rosemeis/pcangsd.git
  4. cd pcangsd/
  5. python setup.py build_ext --inplace
  6. pip install --user -r requirements.txt
  7. pip3 install -e .

adding the pcangsd folder to both my PATH and PYTHONPATH

I can see others have had this issue, but the previous steps seemed to have solved the issue for them, and haven't worked for me unfortunately. Any help would be greatly appreciated!

ashno376 commented 1 year ago

This issue has been solved: because I was operating on a shared high power computing cluster, I was using the default python, but did not have permissions to install modules, which I think was causing the error. When creating a python virtual environment, and uninstalling and reinstalling as above, the program ran as intended.