Skip to content

Instantly share code, notes, and snippets.

Forked from kauffmanes/
Last active February 3, 2019 22:21
Show Gist options
  • Save kosar/59ee3174aef90f3741580ba80c6182ee to your computer and use it in GitHub Desktop.
Save kosar/59ee3174aef90f3741580ba80c6182ee to your computer and use it in GitHub Desktop.
Install Anaconda on Windows Subsystem for Linux (WSL)

Note: $ denotes the start of a command. Don't actually type this.

Steps to Install Anaconda on Windows Ubuntu Terminal

  1. Install WSL (Ubuntu for Windows - can be found in Windows Store). I recommend the latest version (I'm using 18.04) because there are some bugs they worked out during 14/16 (microsoft/WSL#785)
  2. Go to to find the list of Anaconda releases
  3. Select the release you want. I have a 64-bit computer, so I chose the latest release ending in If I had a 32-bit computer, I'd select the version. If you accidentally try to install the wrong one, you'll get a warning in the terminal. I chose
  4. From the terminal run wget[YOUR VERSION]. Example: $ wget
  5. Run the installation script: $ bash Anaconda[YOUR VERSION].sh ($ bash (Note: on Windows you may need to set execution permissions on the installer by running this from the terminal: chmod +x Anaconda[YOUR VERSION] -- this will allow you to then run the installation script.
  6. Read the license agreement and follow the prompts to accept. When asks you if you'd like the installer to prepend it to the path, say yes.
  7. Optionally install VS Code when prompted
  8. Close the terminal and reopen it to reload .bash configs.
  9. To test that it worked, run $ which python. It should print a path that has anaconda in it. Mine is /home/kauff/anaconda3/bin/python. If it doesn't have anaconda in the path, do the next step. Otherwise, move to step 11.
  10. Manually add the Anaconda bin folder to your PATH. To do this, I added "export PATH=/home/kauff/anaconda3/bin:$PATH" to the bottom of my ~/.bashrc file.
  11. To open jupyter, type $ jupyter notebook --no-browser. The no browser flag will still run Jupyter on port 8888, but it won't pop it open automatically. it's necessary since you don't have a browser (probably) in your subsystem. In the terminal, it will give you a link to paste into your browser. If it worked, you should see your notebooks!

Leave a comment on anything you see that doesn't work and I can look into it!

A few other things that I did out of laziness but aren't necessary

  • made a symlink between my C:/Users/kauff/Documents/JupyterNotebooks folder (where I put my downloaded notebooks in Windows) to my Ubuntu notebook directory: In the WSL terminal:
  1. cd ~
  2. ln -s /mnt/c/Users/kauff/Documents/JupyterNotebooks/ notebooks Now when you look at Jupyter on :8888, you should see a notebooks folder that has everything your C:/Users/kauff folder has.
  3. I made an alias for the juypter command by putting this command in my .bash_aliases: alias jup='cd /home/kauff/notebooks && jupyter notebook --no-browser. Restart the terminal for this new command to take effect.
  4. To test, simply type jup from anywhere in the ubuntu directory and it will take you notebooks folder and run jupyter. When you copy and paste the URL, you'll see everything in your C:/Users/kauff/JupyterNotebooks folder.


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment