This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Type: <type 'exceptions.ImportError'> Exception: cannot import name random_choice_csc

Hello everyone,

I downloaded 20/20+ and all packages needed and installed them. I also added the 20/20+ directory to my path variable and I would see the location when I inputted the command $ which 2020plus.py. However, the 20/20+ could not run. The command and error was bellow. I wolud be appreciate it if you could help me solve this problem.

[itmll@node33 pancan_example]$ python2.7 `which 2020plus.py` features -og-test oncogene.txt -tsg-test tsg.txt --summary summary_pancan.txt -o features_pancan.txt

Version: 1.1.2

Command: /data/itmll/yhan/20_20/2020plus-1.1.2/2020plus.py features -og-test oncogene.txt -tsg-test tsg.txt --summary summary_pancan.txt -o features_pancan.txt

**************

AN ERROR HAS OCCURRED: check the log file

**************

Type: < type 'exceptions.ImportError'>

Exception: cannot import name random_choice_csc

Traceback:

File "/data/itmll/yhan/20_20/2020plus-1.1.2/2020plus.py", line 329, in <module>
import src.classify.python.classifier

File "/data/itmll/yhan/20_20/2020plus-1.1.2/src/classify/python/classifier.py", line 2, in <module>
from src.classify.python.dummy_clf import DummyClf

File "/data/itmll/yhan/20_20/2020plus-1.1.2/src/classify/python/dummy_clf.py", line 1, in <module>  
from sklearn.dummy import DummyClassifier

File "/public/software/bin/python2.72/lib/python2.7/site-packages/sklearn/dummy.py", line 16, in <module> 
from .utils.random import random_choice_csc

I was wandering how to run 20/20+ correctly.

2020+

1 answer

Python packages dependencies can be tricky, and installing the packages with different orders can have different results. I suggest you use use the dependencies file provided with 20/20+, and install as instructed in the manual:

pip install -r requirements.txt

In addition, I would use virtualenv, so it is easy to start over if the install is messed up.

It worked well. I just knew the order of installing packages would influence the performance of a software tool. Thank you very much for helping me.

Log in to answer this question.