-
Notifications
You must be signed in to change notification settings - Fork 922
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UMAP installed but not recognized #1020
Comments
I had the same issue. But you can |
Hi @cstill1992, What happens if you install UMAP using the Pip/Python installation that came with your Mac? We've noticed that reticulate doesn't see Anaconda-installed Python modules, so we recommend not using Anaconda. |
Closing this issue as both suggested solutions (not using anaconda, and restarting R) should be sufficient for reticulate to detect UMAP |
@satijalab @mojaveazure So if there is a need to use Anaconda or that is what users have installed appears that this works to solve the issue. Thanks for all you do with Seurat! |
Hi, I have the same issue and I tried all the above solution and doesn't work. |
I am using Domino system and both solution did not work for me. Still have the "could not find UMAP" error. I cannot restart the R session -- every time I shut down the session it will start a new EC2. Thanks, |
Hi guys, sorry for getting away from this for a bit. So neither of the above solutions really worked for me and I eventually just did |
Hi, I found the solution, so umap-learn should be installed using python v3 and pip v3 |
in my case |
just figured out in a new EC2 instance that after install i also need to restart r session to get it work: |
I had to add the location of my python 3 in the R session.
|
Hello. Can someone give me the final codes that you used on both anaconda and r for umap installation? Please give the order also. |
Another fix which worked in my case and which I haven't seen in previous comments. In my case the problem was that reticulate wasn't able to find my python install, so nothing worked, but the error was that the umap package was missing (which wasn't the issue). The check for this is:
You'll either get something which says which version of python has been found, or in my case it produced:
If I then specified the location of python by running
After the python was discovered then RunUMAP also started to work. |
Hi, but still, I can't run the UMAP Seurat command! Any suggestions... Thanks, HM |
HM, it looks like your umap install is in in a local path instead of installed with conda. If you have multiple python installs, try use_python("/home/labs/shalev/hassanm/.local/lib/python3.6/") to allow R to recognize where it should be looking for packages as outlined prior in this thread. |
@s-andrews's answer helped but not worked in my case. I am working in Rstudio server. Using > library(reticulate)
> py_config()
python: /usr/bin/python
libpython: /usr/lib64/libpython2.7.so.1.0
pythonhome: /usr:/usr
version: 2.7.5 (default, Aug 4 2017, 00:39:18) [GCC 4.8.5 20150623 (Red Hat 4.8.5-16)]
numpy: /T02Data/niuyw/.local/lib/python2.7/site-packages/numpy
numpy_version: 1.16.4
> use_python('/T02Data/niuyw/software/anaconda3/bin/python')
> py_config()
python: /usr/bin/python
libpython: /usr/lib64/libpython2.7.so.1.0
pythonhome: /usr:/usr
version: 2.7.5 (default, Aug 4 2017, 00:39:18) [GCC 4.8.5 20150623 (Red Hat 4.8.5-16)]
numpy: /T02Data/niuyw/.local/lib/python2.7/site-packages/numpy
numpy_version: 1.16.4 And the method below worked for me. Install umap under the Python used by R. # install pip
$ curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
$ /usr/bin/python get-pip.py --user
# install umap
$ .local/bin/pip install umap-learn --user I also tried to change $ cat .Renviron
RETICULATE_PYTHON=~/software/anaconda3/bin/python Hope this would be helpful for situations like me. |
Thanks. This worked |
Hi I'm new to seurat and I've tried the above options but still having trouble. This is my code: install.packages("reticulate")
I've got the latest version of anaconda. I'm on windows 64-bit. Any suggestions would be very much appreciated :) |
All the above also helped me to untangle the problems I was having. python3 -m pip install scipy --user --upgrade I realize that Seurat now using "uwot", but that won't solve the umap issue if you are doing: RunUMAP(obj, umap.method='umap-learn') |
Hi there, I keep getting this issue when trying to use umap on my Seurat object in R I have tried renaming and reinstalling umap-learn with reticulate::py_install(packages = 'umap-learn') would be very grateful if anyone could help me with this issue! |
I have meet the same problem。 I use "pip3 install umap-learn" in the terminal of Rstudio, then I restart the Rstudio, It worked |
Hi, I am also encountering the same issue and haven't found a solution. I try running the following over four Seurat objects:
All runs fine, then if I try to plot the UMAP:
And indeed none of them have the reduction in the meta data
I tried some of the above solutions and somehow it worked once, but when I had to close and restart a new R session they no longer worked -- even when I repeated them. This is the one that worked the first time:
And if I try it now that it doesn't work again I get the same output as when it did
I also tried the
|
Hi @AnnaAMonaco this error means UMAP was not run and/or not saved in the seurat object. I see you're having trouble installing it on your machine. I believe there is also a R-based version of UMAP you can install. Can you try install.packages('umap') ? |
Hi @AnnaAMonaco @cemalley is right that there is issue with the UMAP saving to the object. What happens if you just run the code in solo not in for loop? In terms of umap-learn that is not necessary unless you want to use the python version. Since Seurat 3.1.0 the R native uwot package is the default method for running umap unless you specifically specify otherwise during the Best, |
@cemalley that worked, thanks so much! |
This also worked for me |
Hi all! I've been through all the options mentioned here but I haven't found a solution for my case. I've installed python3 and umap-learn through pip3 in a Docker:
I've forced the
The
Which is where the umap-learn is inside the docker:
I don't know if it matters, but I'm running an R script with the Seurat code from a Python script. At the beginning of the Python script I specified Still, the following error appears:
I'm running umap like this:
It seems that everything matches, why it is still unable to find the umap-learn? Any help will be greatly appreciated! |
Hi, I'm excited to use the new integration with UMAP but I can't get it to work. Below is the R code and verification that it is installed.
The text was updated successfully, but these errors were encountered: