<p>If you haven't already done so I would make a complete installation of Anaconda, particularly good with bash. The I would either install using Anaconda Navigator, or ...</p>

<pre><code># Create an R environment and activate it
conda create -n r_env r-essentials r-base python=3.7
conda activate r_env

# install Reurat
conda install -c bioconda r-seurat

# installing standard packages
conda install -c r r-randomforest --yes
</code></pre>

<p>If you have a Mac the instructions are <a href="https://www.guru99.com/download-install-r-rstudio.html#4" rel="nofollow noreferrer">here</a>. In some systems you need to just <code>activate r_env</code> . </p>

<p>Please note if you've installed e.g. <code>python3</code> with <strong><code>pip</code></strong> a conflict occurs with the Anaconda package. </p>

CC BY-SA 4.0
2020-04-21T18:52:30.203Z
2020-04-21T18:59:02.023Z
2020-04-21T18:59:02.023Z
M__
<p>I just saw this question. The solution to your problem is <a href="https://github.com/satijalab/seurat/issues/2769#issuecomment-1211152502" rel="nofollow noreferrer">here</a></p>

CC BY-SA 4.0
2022-08-10T20:01:48.933Z
Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer).
Community
CC BY-SA 4.0
2022-08-10T19:19:28.507Z
2022-08-10T19:19:28.507Z
Mendel
<p>I recently tried to load library(Seurat) after installing Seurat package. It caused my R studio to have a fatal error and abort my session. I have successfully downloaded it before. I have uninstalled R and R studio and reinstalled, restarted my computer. I am new to R too, so I'm not sure what I'm doing. </p>

<p>I am following the directions provided on the satijalab.org website on how to install Seurat. </p>

<p>Here's a screenshot of the error message. <a href="https://i.sstatic.net/bOj4f.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/bOj4f.png" alt="enter image description here"></a></p>

<p>I ran install.packages("Seurat") in R. R is also crashing as soon as I run library(Seurat). Here's a screenshot right before I hit run, and when it crashes, R application just closes. </p>

<p><a href="https://i.sstatic.net/zmtHg.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/zmtHg.png" alt="enter image description here"></a></p>

CC BY-SA 4.0
2020-04-21T19:08:36.950Z
hi @DianaatDuke, looking at the screen shot, seems like it downloaded the package..  i am surprised it doesn't try to install other dependencies, since you installed a new R or Rstudio? can you load other libraries, save library(uwot) , since this is needed for Seurat too
StupidWolf
CC BY-SA 4.0
2020-04-21T20:06:25.737Z
Yes, no error message when i run the code library(uwot).
Diana at Duke
CC BY-SA 4.0
2020-04-21T20:06:33.653Z
Okay it might be Seurat is not checking for the installation of core dependencies
M__
CC BY-SA 4.0
2020-04-21T20:08:11.790Z
I did the same analysis last week and it was actually perfectly fine. So do you think something changed since then?
Diana at Duke
CC BY-SA 4.0
2020-04-21T20:10:00.217Z
i would go crazy if that's the case lol... can you try opening R , preferably use a terminal , powershell whichever you are on, and try to load Seurat.. just check it's not Rstudio
StupidWolf
CC BY-SA 4.0
2020-04-21T20:12:43.283Z
I am going crazy, it's been 2.5 hours of me trying to figure out what's wrong. R is also crashing. I can run this without problem -  install.packages("Seurat"). As soon as I run library(Seurat), R just crashes.
Diana at Duke
CC BY-SA 4.0
2020-04-21T20:15:55.210Z
it can be solved..ok do you always run R from 1 directory? did you try removing the .Rhistory .Rdata files?https://stat.ethz.ch/pipermail/r-sig-mac/2012-June/009326.html
StupidWolf
CC BY-SA 4.0
2020-04-21T20:18:01.127Z
I tried to remove .Rhistory in R studio on the bottom right screen of (under Files tab). but I didn't try removing .Renviron    - where can I find and delete that?
Diana at Duke
CC BY-SA 4.0
2020-04-21T20:23:23.697Z
I'm using my work mac laptop. I actually tried to run this exercise on my personal Mac, and had the same problems. I can borrow a PC laptop and try to do it on there? but ultimately, I need this to run on my mac laptop.
Diana at Duke
CC BY-SA 4.0
2020-04-21T20:27:29.143Z
it's ok, mac makes it easier. So open a terminal (go to applications /utilities or just search). then do ls .R* ; you should see .Rapp.history .Renviron .Rhistory or maybe something more, delete these by doing rm .Rhistory etc..
StupidWolf
CC BY-SA 4.0
2020-04-21T20:28:02.633Z
I suggest those above because from your R, i can see you are loading .Rapp.history.. whatever that might be. Once all deleted;  type R in the terminal ; and R will be loaded in a terminal. try library(Seurat) then
StupidWolf
CC BY-SA 4.0
2020-04-21T20:30:43.037Z
this is the message I get when I type in .R* 

GI-C02ZC1G0:~ dl319$ .R*
-bash: .Rapp.history: command not found
Diana at Duke
CC BY-SA 4.0
2020-04-21T20:31:04.653Z
Let us [continue this discussion in chat](https://chat.stackexchange.com/rooms/107003/discussion-between-stupidwolf-and-diana-at-duke).
StupidWolf
CC BY-SA 4.0
2020-04-21T21:34:54.960Z
@StupidWolf helped me figured it out! Needed to remove r-miniconda and then reinstall Seurat package.
Diana at Duke
<r><seurat><rstudio>
Why is library(Seurat) causing my R session to have a fatal error?
# Why is library(Seurat) causing my R session to have a fatal error?

(Asked by: username_0 on 2020-04-21)

I recently tried to load library(Seurat) after installing Seurat package. It caused my R studio to have a fatal error and abort my session. I have successfully downloaded it before. I have uninstalled R and R studio and reinstalled, restarted my computer. I am new to R too, so I'm not sure what I'm doing.

I am following the directions provided on the satijalab.org website on how to install Seurat.

Here's a screenshot of the error message. [![enter image description here](https://i.sstatic.net/bOj4f.png)](https://i.sstatic.net/bOj4f.png)

I ran install.packages("Seurat") in R. R is also crashing as soon as I run library(Seurat). Here's a screenshot right before I hit run, and when it crashes, R application just closes.

[![enter image description here](https://i.sstatic.net/zmtHg.png)](https://i.sstatic.net/zmtHg.png)

**Tags:** r, seurat, rstudio
> **Comments:**
> **username_1**: hi @DianaatDuke, looking at the screen shot, seems like it downloaded the package..  i am surprised it doesn't try to install other dependencies, since you installed a new R or Rstudio? can you load other libraries, save library(uwot) , since this is needed for Seurat too  
> **username_0**: Yes, no error message when i run the code library(uwot).  
> **username_2**: Okay it might be Seurat is not checking for the installation of core dependencies  
> **username_0**: I did the same analysis last week and it was actually perfectly fine. So do you think something changed since then?  
> **username_1**: i would go crazy if that's the case lol... can you try opening R , preferably use a terminal , powershell whichever you are on, and try to load Seurat.. just check it's not Rstudio  
> **username_0**: I am going crazy, it's been 2.5 hours of me trying to figure out what's wrong. R is also crashing. I can run this without problem -  install.packages("Seurat"). As soon as I run library(Seurat), R just crashes.  
> **username_1**: it can be solved..ok do you always run R from 1 directory? did you try removing the .Rhistory .Rdata files?https://stat.ethz.ch/pipermail/r-sig-mac/2012-June/009326.html  
> **username_0**: I tried to remove .Rhistory in R studio on the bottom right screen of (under Files tab). but I didn't try removing .Renviron    - where can I find and delete that?  
> **username_0**: I'm using my work mac laptop. I actually tried to run this exercise on my personal Mac, and had the same problems. I can borrow a PC laptop and try to do it on there? but ultimately, I need this to run on my mac laptop.  
> **username_1**: it's ok, mac makes it easier. So open a terminal (go to applications /utilities or just search). then do ls .R* ; you should see .Rapp.history .Renviron .Rhistory or maybe something more, delete these by doing rm .Rhistory etc..  
> **username_1**: I suggest those above because from your R, i can see you are loading .Rapp.history.. whatever that might be. Once all deleted;  type R in the terminal ; and R will be loaded in a terminal. try library(Seurat) then  
> **username_0**: this is the message I get when I type in .R*   GI-C02ZC1G0:~ dl319$ .R* -bash: .Rapp.history: command not found  
> **username_1**: Let us [continue this discussion in chat](https://chat.stackexchange.com/rooms/107003/discussion-between-stupidwolf-and-diana-at-duke).  
> **username_0**: @StupidWolf helped me figured it out! Needed to remove r-miniconda and then reinstall Seurat package.  

---

## 2 answers

### Answer by username_2 on 2020-04-21. Score: 1

If you haven't already done so I would make a complete installation of Anaconda, particularly good with bash. The I would either install using Anaconda Navigator, or ...
# Create an R environment and activate it
conda create -n r_env r-essentials r-base python=3.7
conda activate r_env

# install Reurat
conda install -c bioconda r-seurat

# installing standard packages
conda install -c r r-randomforest --yes

If you have a Mac the instructions are here. In some systems you need to just activate r_env . 
Please note if you've installed e.g. python3 with pip a conflict occurs with the Anaconda package.


---

### Answer by username_3 on 2022-08-10. Score: 0

I just saw this question. The solution to your problem is [here](https://github.com/satijalab/seurat/issues/2769#issuecomment-1211152502)

> **Comments:**
> **username_4**: Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer).  

---

