rajanil / fastStructure

A variational framework for inferring population structure from SNP genotype data.
MIT License
134 stars 50 forks source link

Missing Module #39

Open junex opened 6 years ago

junex commented 6 years ago

When I try to run the program, it always return the following error: python structure.py Traceback (most recent call last): File "structure.py", line 3, in import fastStructure File "vars/admixprop.pxd", line 5, in init fastStructure cdef class AdmixProp: File "allelefreq.pxd", line 7, in init admixprop

Martinam01 commented 6 years ago

I am having the same issue, same error response.

jbyoder commented 6 years ago

I'm getting exactly the same thing. I've been trying to set up on a server running GNU/Linux RedHat; I've installed, and confirmed, python 2.7.13, scipy, numpy, cython, and GSL. No errors are thrown while running the two setup scripts (though there are warnings about a deprecated numpy API), and the files referenced in the error, vars/admixprop.pxd and vars/allelefreq.pxd are present and non-empty. Happy to provide actual screen output or more system information if it'll help.

mike2vandy commented 6 years ago

Same. 2 different linux (CentOS) systems, same problem.

python structure.py Traceback (most recent call last): File "structure.py", line 3, in import fastStructure File "vars/admixprop.pxd", line 5, in init fastStructure cdef class AdmixProp: File "allelefreq.pxd", line 7, in init admixprop ImportError: No module named allelefreq

No solutions yet?

wandhydrant commented 6 years ago

Looks like this is introduced by Cython 0.28. So if you got your Cython from PyPI (via pip), you can install Cython 0.27 like this:

pip uninstall cython
pip install cython==0.27.3

Then, rebuild the extensions in both folders as documented - I added the -f flag to enforce rebuilding, thus my entire line was

python setup.py build_ext -f --inplace
mike2vandy commented 6 years ago

That helped. Thanks for the fix.

jbyoder commented 6 years ago

And it's resolved the issue for me, too. Thanks!

junex commented 6 years ago

this helped,thanks

Chenglin20170390 commented 6 years ago

thank you! this helped me

rvosa commented 5 years ago

same here, thanks a lot!

ghost commented 5 years ago

I had issues getting fastStructure up and running in Linux, so I wrote out the steps I took to make it work here: https://gist.github.com/josiahaltschuler/a063e03b4197013def53f9a0abc6dfed

Hope this helps. If I missed anything please message me.

JuZ9 commented 4 years ago

works for me too! Thanks!

MboiTui commented 4 years ago

This did not work for me.

I am working within a conda virtual environment. While the environment was activated I ran wandhydrant's suggested solution, and then reactivated the virtual environment, but the problem persists.

To *try and fix this, I uninstalled cython from the anaconda navigator, and then reinstalled using:

conda install cython==0.27.3

Afterwards, I had to reinstall numpy

conda install numpy

But now I am getting the same error once more

mylifeandscience commented 2 years ago

That did not work for me either but @MboiTui 's suggestion worked and so did

pip install Cython==0.27.3 --install-option="--no-cython-compile"