KrishnaswamyLab / MAGIC

MAGIC (Markov Affinity-based Graph Imputation of Cells), is a method for imputing missing values restoring structure of large biological datasets.
GNU General Public License v2.0
341 stars 97 forks source link

ImportError: cannot import name '_joint_probabilities_nn' #102

Closed abmmki closed 6 years ago

abmmki commented 6 years ago

Hi, I have installed it successfully, but while running, it is showing import error. Could you help what is missing? Thanks

sudo -H pip3 install . Processing /home/magic/python Requirement already satisfied: numpy>=1.10.0 in /usr/lib64/python3.4/site-packages (from magic==0.0) (1.12.0) Requirement already satisfied: pandas>=0.18.0 in /usr/lib64/python3.4/site-packages (from magic==0.0) (0.20.2) Requirement already satisfied: scipy>=0.14.0 in /usr/lib64/python3.4/site-packages (from magic==0.0) (0.18.1) Requirement already satisfied: matplotlib in /usr/lib64/python3.4/site-packages (from magic==0.0) (2.0.0) Requirement already satisfied: seaborn in /usr/lib/python3.4/site-packages (from magic==0.0) (0.8.1) Requirement already satisfied: scikit-learn in /usr/lib64/python3.4/site-packages (from magic==0.0) (0.16.1) Requirement already satisfied: python-dateutil>=2 in /usr/lib/python3.4/site-packages (from pandas>=0.18.0->magic==0.0) (2.6.0) Requirement already satisfied: pytz>=2011k in /usr/lib/python3.4/site-packages (from pandas>=0.18.0->magic==0.0) (2015.4) Requirement already satisfied: cycler>=0.10 in /usr/lib/python3.4/site-packages (from matplotlib->magic==0.0) (0.10.0) Requirement already satisfied: six>=1.10 in /usr/lib/python3.4/site-packages (from matplotlib->magic==0.0) (1.10.0) Requirement already satisfied: pyparsing!=2.0.0,!=2.0.4,!=2.1.2,!=2.1.6,>=1.5.6 in /usr/lib/python3.4/site-packages (from matplotlib->magic==0.0) (2.1.5) Installing collected packages: magic Running setup.py install for magic ... done Successfully installed magic-0.0 [python]$ [python]$ MAGIC.py -h Traceback (most recent call last): File "/bin/MAGIC.py", line 8, in import magic File "/home/magic/python/magic/init.py", line 1, in from . import MAGIC_core File "/home/magic/python/magic/MAGIC_core.py", line 5, in from sklearn.manifold.t_sne import _joint_probabilities, _joint_probabilities_nn ImportError: cannot import name '_joint_probabilities_nn'

pkathail commented 6 years ago

It's possible it could be because you don't have the correct version of scikit-learn installed. You can upgrade it by doing pip3 install --upgrade scikit-learn

danieldager commented 6 years ago

Hi abmmki,

If you're still having this problem, there's a good chance it's been resolved with the release of MAGIC v1.0. Uninstall your current version of MAGIC and reinstall per the directions of the new README. I'm closing this for now; please feel free to open a new issue if you still have problems!