Skip to content

Instantly share code, notes, and snippets.

@TomatOid
Last active April 27, 2024 21:07
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save TomatOid/335f53d72cc3a93022e827d9f650aaa4 to your computer and use it in GitHub Desktop.
Save TomatOid/335f53d72cc3a93022e827d9f650aaa4 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.
@eturner83
Copy link

I got "Permission Denied" on two different lines

@TomatOid
Copy link
Author

TomatOid commented Sep 8, 2021

Are y'all on a school-managed chromebook? I have not personally tested it but I don't think it is easily doable on one of those

@deWasbeer
Copy link

hi there im following your exact instructions but am getting the following error:
/home/chronos/user/anaconda3/conda.exe: error while loading shared libraries: /tmp/_MEISNzuiz/libz.so.1: file not located on exec mount

@ggerbaldo
Copy link

I've just try to install Anaconda by Activating Linux Beta on Terminal
Using -s bash Anaconda3-2020.02-Linux-x86_64.sh

but...

image

@skycaptin75
Copy link

Are y'all on a school-managed chromebook? I have not personally tested it but I don't think it is easily doable on one of those
Some school managed chromebooks do not even let you change them to developer mode due to their restrictions

@skycaptin75
Copy link

Please, how do I open jupyter from the terminal on a chromebook

@dinesh00509
Copy link

type jupyter-lab if u already installed that

@Omfat
Copy link

Omfat commented Dec 11, 2023

Hi...I need help installing Anaconda on my Chromebook because I can't do the same result with the guidance.

Screenshot 2023-12-12 06 11 52

@p3n68
Copy link

p3n68 commented Mar 1, 2024

New chromebooks cant use crosh

@leerohrer1
Copy link

leerohrer1 commented Apr 18, 2024

Are y'all on a school-managed chromebook? I have not personally tested it but I don't think it is easily doable on one of those

I'm not on a school Chromebook and I'm getting the "Permission Denied" error. Is there a solution for this?

The specific errors are

Anaconda3-2021.04-Linux-x86_64.sh: line 381: /home/chronos/user/anaconda3/conda.exe: Permission denied
Anaconda3-2021.04-Linux-x86_64.sh: line 383: /home/chronos/user/anaconda3/conda.exe: Permission denied

I tried changing the path per this post, but I got

mkdir: cannot create directory '/usr/local/anaconda3': Permission denied
ERROR: Could not create directory: '/usr/local/anaconda3'

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