Skip to content

Instantly share code, notes, and snippets.

@jotisa
Forked from TomatOid/anaconda_install_chromeos.md
Last active November 12, 2022 08:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jotisa/d8640803ef2de81452987360186fb758 to your computer and use it in GitHub Desktop.
Save jotisa/d8640803ef2de81452987360186fb758 to your computer and use it in GitHub Desktop.
Python4Physics: Installing anaconda on Chrome OS

Installing Anaconda on Chrome OS is very similar to a linux install, with a few extra steps.

  • Firstly, you will need to enable developer mode on your chromebook. Refer to the official google documentation for information on how to do this.
  • Now, you will need to download the latest Anaconda for 64 bit (most likely x86) linux to your Downloads folder. As of 5/12/2021, the latest version can be downloaded here.
  • You will now need to enter Chrome OS's super secret terminal by pressing the key combination Ctrl + Alt + T. You will find yourself in the very strange crosh terminal which is mainly used for debugging Chrome. To enter a proper shell environment, type shell and press enter. If this command fails, you are probably not in developer mode.
  • Note: you can paste into the terminal using the key combo Ctrl + Shift + V
  • We now need to change what directory the shell is looking at. Enter the command cd ~/Downloads to go to where you downloaded the anaconda installer to.
  • Chrome OS has restrictions on where files can be executed (run), but these can be overcome by the command sudo mount -o remount,rw -o exec ~ which allows files to be executed in your home directory. You may need to enter your administrator password to run this command (you may need to contact your sysadmin and explain what you are doing and ask them nicely for the password if you do not own your computer). If you get an error like "not mounted or bad option" add (with no spaces) /.. to the end of the previous command (which you can bring up by pressing the up arrow on your keyboard). If it still doesn't work, keep adding /.. untill it works or you get a different error.
  • Your chromebook should now be ready to run the anaconda installer. Enter bash Anaconda3-2020.02-Linux-x86_64.sh or whichever version you downloaded before.
  • If all went well, you should be seeing a bunch of legal nonsense. Press and hold enter to scroll through it, then enter yes if you agree to the terms.
  • Press enter again to select the default install location, wait for it to install everything, and start coding.
  • Note: anaconda-navigator will not work, so the applications must be launched from the terminal. When using the jupyter notebook command, you may need to manually copy the localhost link by just selecting it and then pasting it into the address bar of a new tab.
  • Additional Note: You will have to re-run the sudo mount -o remount,rw -o exec ~ command if you restart your computer or close the shell to allow running python; however, you do not need to redo any other part of the installation. If you want this to happen automatically, enter vim ~/.bashrc, go to insert mode by pressing i, and add the command under the # Put your fun stuff here. comment line. Press Esc to leave insert mode and type :wq and press enter to save and quit. Open a new terminal without closing the other one, type shell and make sure it works as expected. You may need to remove the command from .bashrc in the other tab if it doesn't work.
@jotisa
Copy link
Author

jotisa commented Nov 12, 2022

updated first link pointing to a new link where google changes master to HEAD in the URL.

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