sr320 / LabDocs

Roberts Lab Documents
http://sr320.github.io/LabDocs/
9 stars 17 forks source link

Installing Jupyter notebook #664

Closed Ellior2 closed 6 years ago

Ellior2 commented 6 years ago

So I have had to reinstall all the programs on my computer, one of which was Anaconda (for Jupyter). I am following these directions on the website:

image

I downloaded Anaconda3 (Python 3.6.1)

image

Here it is locally on my computer:

image

image

And now when I try to type jupyter notebook in command window I get command not found

image

Am I missing something? I tried uninstalling and reinstalling several times as well as downloading the 32bit Python 3.6 and the earlier version of 64bit Python 2.7.

sr320 commented 6 years ago

Have you tried clicking on the app icon?

On Mon, Jul 24, 2017 at 7:16 PM Rhonda Elliott notifications@github.com wrote:

So I have had to reinstall all the programs on my computer, one of which was Anaconda (for Jupyter). I am following these directions on the website:

[image: image] https://user-images.githubusercontent.com/20071030/28552369-e82aaa3c-70a2-11e7-85fd-b1652432fef5.png

I downloaded Anaconda3 (Python 3.6.1)

[image: image] https://user-images.githubusercontent.com/20071030/28552398-09230450-70a3-11e7-8631-319087c48df8.png

Here it is locally on my computer:

[image: image] https://user-images.githubusercontent.com/20071030/28552456-61175eae-70a3-11e7-9803-cfbb6ab2984d.png

[image: image] https://user-images.githubusercontent.com/20071030/28552356-d2335c7e-70a2-11e7-9fc2-5dd1194d9949.png

And now when I try to type jupyter notebook in command window I get command not found

[image: image] https://user-images.githubusercontent.com/20071030/28552637-5325c3f2-70a4-11e7-8fd6-d528038e687c.png

Am I missing something? I tried uninstalling and reinstalling several times as well as downloading the 32bit Python 3.6 and the earlier version of 64bit Python 2.7.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/sr320/LabDocs/issues/664, or mute the thread https://github.com/notifications/unsubscribe-auth/AEPHt6hATblzuh9c6BWA2My2UmivylVXks5sRU-zgaJpZM4Oh-sz .

kubu4 commented 6 years ago

Also, are you running that jupyter notebook command in a git bash terminal or a Windows terminal?

Ellior2 commented 6 years ago

Ahhh ok. It's not how I have used Jupyter in the past. Before I just typed jupyter notebook into git bash terminal and it opened it in web browser. I tried just pinning the Jupyter notebook app icon on my task bar and when I clicked on it, it opened the Jupyter notebook successfully in my browser! Yay

image

I thought I tried that earlier, but it seems to be working now. For whatever reason though, I still can't open it in the git bash terminal

kubu4 commented 6 years ago

The most likely reason that you're unable to launch Jupyter Notebook from Git Bash is probably because your Anaconda installation (which contains Jupyter Notebook) is not listed in your system PATH variable. The PATH variable is a variable that stores the locations of various programs. Basically, it allows you to use shortcuts when launching a program (e.g. jupyter notebook instead of typing out the entire path to the Jupyter Notebook program each time).

To look at what locations are currently contained in your system PATH variable, do the following:

  1. Open Git Bash
  2. Type: echo $PATH

You should see a long, colon-delimited list of various paths to various directories.

To see if Anaconda (i.e. Jupyter Notebook) is contained in the PATH variable, peruse the list for something like: /c/Users/Rhonda/Anaconda3

I'm guessing you won't find anything showing Anaconda in your PATH variable.

To add Anaconda (and Jupyter Notbook) to your system PATH variable, you need to edit your .bash_profile file. This is a file that gets read by Git Bash every time you start Git Bash. It is located in your home directory (e.g. /c/Users/Samb/.bash_profile). Because the file has a period at the beginning of the file name, by default, it will be hidden, so you won't be able to see it in the Windows GUI, unless you enable viewing of hidden files.

To edit the file and add Anaconda to your system PATH, do the following:

  1. Open Git Bash.
  2. View current .bash_profile file. Type: cat ~/.bash_profile
  3. Add Anaconda path to system PATH (you might need to change "Rhonda" to your actual username). Type: echo "export PATH="$PATH:/c/Users/Rhonda/Anaconda3/Scripts/jupyter" >> ~/.bash_profile
  4. Verify that line was added to your .bash_profile. Type: cat ~/.bash_profile

You should see that line is in your .bash_profile file now.

To see if this whole thing worked.

  1. Close Git Bash.
  2. Open Git Bash.
  3. Type: which jupyter

If it worked, that command should return something like this: /c/Users/Samb/Anaconda3/Scripts/jupyter

If you're willing to try all that, please let me know if it worked (or, if it didn't).