0

I'm trying to run a Python package called D3E for single-cell differential gene expression. I have Python 2.7.5 on Fedora 20. I just installed the SciPy package using the instructions here:

sudo yum install numpy scipy python-matplotlib ipython python-pandas sympy python-nose

However, when I try to run the script, I keep getting a SciPy error:

bash-4.2$ python D3ECmd.py ~/Documents/geneExpressionTable.txt ~/outputFile.txt cellType1 cellTYpe2 -n=0, -z=1

    Traceback (most recent call last):
      File "D3ECmd.py", line 34, in <module>
        from D3EUtil import readData, getParamsBayesian, getParamsMoments, cramerVonMises, logStatus, goodnessOfFit, distributionTest
      File "/home/user/Software/D3E/D3EUtil.py", line 36, in <module>
        from scipy.stats import gmean, ks_2samp, anderson_ksamp
    ImportError: cannot import name anderson_ksamp

What would you recommend I try to fix this error?

Thanks.

Carmen Sandoval
  • 2,266
  • 5
  • 30
  • 46

1 Answers1

2

As @Warren pointed out, anderson_ksamp is not available in scipy version .12.1. It is a relatively new addition to scipy.

I'm not a fedora user. That said, it sounds like installing scipy using pip is your best bet.

Step one: install dependencies. Check Muneeb's answer for information on how to install blas and lapack on fedora. It should be as simple as:

sudo yum install lapack lapack-devel blas blas-devel

Step two: install scipy using pip.

sudo pip install --upgrade scipy

This process will take a long time. Get lunch. You should have a working copy of scipy when you get back.

Note, if you don't have pip, run the following command:

sudo yum install python-pip

Community
  • 1
  • 1
MattY
  • 527
  • 2
  • 4
  • 9