Answers.Body: <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>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-04-21T18:52:30.203Z
Answers.LastActivityDate: 2020-04-21T18:59:02.023Z
Answers.LastEditDate: 2020-04-21T18:59:02.023Z
Answers.UserDisplayName: M__
Answers.Body: <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>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-08-10T20:01:48.933Z
Answers.Text: 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).
Answers.UserDisplayName: Community
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-08-10T19:19:28.507Z
Answers.LastActivityDate: 2022-08-10T19:19:28.507Z
Answers.UserDisplayName: Mendel
Body: <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>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-04-21T19:08:36.950Z
Comments.Text: 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
Comments.UserDisplayName: StupidWolf
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-04-21T20:06:25.737Z
Comments.Text: Yes, no error message when i run the code library(uwot).
Comments.UserDisplayName: Diana at Duke
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-04-21T20:06:33.653Z
Comments.Text: Okay it might be Seurat is not checking for the installation of core dependencies
Comments.UserDisplayName: M__
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-04-21T20:08:11.790Z
Comments.Text: I did the same analysis last week and it was actually perfectly fine. So do you think something changed since then?
Comments.UserDisplayName: Diana at Duke
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-04-21T20:10:00.217Z
Comments.Text: 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
Comments.UserDisplayName: StupidWolf
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-04-21T20:12:43.283Z
Comments.Text: 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.
Comments.UserDisplayName: Diana at Duke
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-04-21T20:15:55.210Z
Comments.Text: 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
Comments.UserDisplayName: StupidWolf
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-04-21T20:18:01.127Z
Comments.Text: 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?
Comments.UserDisplayName: Diana at Duke
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-04-21T20:23:23.697Z
Comments.Text: 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.
Comments.UserDisplayName: Diana at Duke
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-04-21T20:27:29.143Z
Comments.Text: 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..
Comments.UserDisplayName: StupidWolf
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-04-21T20:28:02.633Z
Comments.Text: 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
Comments.UserDisplayName: StupidWolf
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-04-21T20:30:43.037Z
Comments.Text: this is the message I get when I type in .R* 
  
  GI-C02ZC1G0:~ dl319$ .R*
  -bash: .Rapp.history: command not found
Comments.UserDisplayName: Diana at Duke
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-04-21T20:31:04.653Z
Comments.Text: Let us [continue this discussion in chat](https://chat.stackexchange.com/rooms/107003/discussion-between-stupidwolf-and-diana-at-duke).
Comments.UserDisplayName: StupidWolf
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-04-21T21:34:54.960Z
Comments.Text: @StupidWolf helped me figured it out! Needed to remove r-miniconda and then reinstall Seurat package.
Comments.UserDisplayName: Diana at Duke
Tags: <r><seurat><rstudio>
Title: Why is library(Seurat) causing my R session to have a fatal error?
ThreadText: # 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 @username_0, 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-username_1-and-username_0).  
  > **username_0**: @username_1 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](https://www.guru99.com/download-install-r-rstudio.html#4). 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).  
  
  ---
  
  