ContextLab / hypertools

A Python toolbox for gaining geometric insights into high-dimensional data
http://hypertools.readthedocs.io/en/latest/
MIT License
1.81k stars 161 forks source link

ImportError: cannot import name UMAP #200

Closed RobinYang125 closed 5 years ago

RobinYang125 commented 6 years ago

Hi! I encountered a strange problem: In [1]: import hypertools

ImportError Traceback (most recent call last)

in () ----> 1 import hypertools /root/Desktop/hypertools/hypertools/hypertools/__init__.py in () 1 #!/usr/bin/env python 2 from .config import __version__ ----> 3 from .plot.plot import plot 4 from .tools.load import load 5 from .tools.analyze import analyze /root/Desktop/hypertools/hypertools/hypertools/plot/plot.py in () 14 from .._shared.helpers import * 15 from .._shared.params import default_params ---> 16 from ..tools.analyze import analyze 17 from ..tools.cluster import cluster as clusterer 18 from ..tools.df2mat import df2mat /root/Desktop/hypertools/hypertools/hypertools/tools/__init__.py in () 1 #!/usr/bin/env python 2 from .align import align ----> 3 from .reduce import reduce 4 from .missing_inds import missing_inds 5 from .cluster import cluster /root/Desktop/hypertools/hypertools/hypertools/tools/reduce.py in () 7 from sklearn.decomposition import PCA, FastICA, IncrementalPCA, KernelPCA, FactorAnalysis, TruncatedSVD, SparsePCA, MiniBatchSparsePCA, DictionaryLearning, MiniBatchDictionaryLearning 8 from sklearn.manifold import TSNE, MDS, SpectralEmbedding, LocallyLinearEmbedding, Isomap ----> 9 from umap import UMAP 10 from ..tools.df2mat import df2mat 11 from .._shared.helpers import * ImportError: cannot import name UMAP Ubuntu 16.04,other information do you still need? Thank you!
jeremymanning commented 6 years ago

Hi @mortimer125, thanks for your bug report! Some additional information will help us debug this:

RobinYang125 commented 6 years ago

ok firstly, it's my first time to install hypertools. secondly, python 2.7.13 finally, the following list is the result of pip list

absl-py 0.2.0
asn1crypto 0.22.0
astor 0.6.2
backports.functools-lru-cache 1.5
backports.weakref 1.0.post1
bleach 1.5.0
certifi 2017.7.27.1
cffi 1.10.0
chardet 3.0.4
conda 4.3.27
cryptography 2.0.3
cycler 0.10.0
deepdish 0.3.6
enum34 1.1.6
funcsigs 1.0.2
future 0.16.0
futures 3.2.0
gast 0.2.0
grpcio 1.11.0
hdbscan 0.8.12
html5lib 0.9999999
hypertools 0.5.0
idna 2.6
ipaddress 1.0.18
kiwisolver 1.0.1
llvmlite 0.23.0
Markdown 2.6.11
matplotlib 2.2.2
mock 2.0.0
numba 0.38.0
numexpr 2.6.4
numpy 1.14.2
pandas 0.22.0
pbr 4.0.2
pip 10.0.1
ppca 0.0.3
protobuf 3.5.2.post1
pycosat 0.6.2
pycparser 2.18
pyOpenSSL 17.2.0
pyparsing 2.2.0
PySocks 1.6.7
python-dateutil 2.7.2
pytz 2018.4
requests 2.18.4
ruamel-yaml 0.11.14
scikit-learn 0.19.1
scipy 1.0.1
seaborn 0.8.1
setuptools 36.5.0.post20170921 singledispatch 3.4.0.3
six 1.10.0
subprocess32 3.2.7
tables 3.4.3
tensorboard 1.8.0
tensorflow 1.8.0
tensorflow-hub 0.1.0
termcolor 1.1.0
umap-learn 0.2.3
urllib3 1.22
Werkzeug 0.14.1
wheel 0.29.0

jeremymanning commented 6 years ago

Sorry-- could you also provide a short demo script that reproduces the error on your system?

RobinYang125 commented 6 years ago

I just write 'import hypertools' in ipython, then it reports errors.

jeremymanning commented 6 years ago

Got it-- we will look into this!

villawang commented 6 years ago

I came across this problem as well. I just found my issue was related to the package seaborn. I got this issue sorted by removing seaborn and reinstalled it. pip uninstall seaborn pip install seaborn Make sure you use pip 9 instead of pip 10.

andrewheusser commented 6 years ago

hmmm, that is strange because UMAP is a separate package and shouldn't be related to seaborn. Maybe the conflict is coming from one of seaborn's dependencies...i'll look into it!

andrewheusser commented 5 years ago

@mortimer125 did you resolve this issue? if not, i'll reopen

Shridharpawar77 commented 3 years ago

Hello, @andrewheusser did you resolved this issue? I am facing this on python 3.8