Just like we install on Linux, Anaconda installation on Chrome OS is quite similar. Installing Anaconda on Chrome OS is not complex, and it entails extra steps compared to the Linux installation. This article is tailored to comprehensively cover how to install and update Anaconda on Chrome OS. Therefore, to be acquainted with this information, read this article to the end.
First, you must enable Developer Mode on your Chrome operating system to proceed with the Anaconda installation process. After enabling Developer Mode, now move and download the latest version of Anaconda on their official website.
Just like any other application, ensure to download the latest installer.
Download Anaconda on Chrome OS
Open your favorite browser and search for Anaconda’s official website. Then, under the Products section, select “Individual Edition,” which is, on most occasions, the first option. We recommend this edition since it is open-source, meaning you cannot incur any additional cost to download and use it on your Chrome OS.
Now proceed and download the latest available version. For instance, when writing this article, the latest Anaconda Individual Edition version is 2021.05.
Note: Always ensure that you look for stable versions since they are tested and proven to work flawlessly compared to unstable releases.
Downloading Anaconda via terminal
Launch the terminal application and change it to a temporary folder on your server. This can be done by executing the command below:
cd /tmp
Note: We switch to the temporary folder because we shall not require the downloaded file on our Chrome OS after installing it. However, if you have enough storage, you can skip this step and download the Anaconda install file to your Chromebook as we did.
Now proceed and download the Anaconda bash script with the aid of the curl command line.
We believe you don’t have curl installed on your operating system. If yes, run the command below to install it since we shall require it to download the Anaconda Bash Script.
sudo apt install curl
Wait till the curl is installed on your Chrome OS before proceeding to the next step, which is downloading the Anaconda bash script file from the Anaconda official Website.
Note: By default, curl is already installed; therefore, first try running the command below. If it fails, now try installing curl.
curl -O https://repo.anaconda.com/archive/Anaconda3-2021.05-Linux-x86_64.sh
That’s it. You have successfully downloaded the Anaconda bash script onto your Chrome OS.
Installing Anaconda on Chrome OS
Use the Ctrl + Alt + T combination to launch the Chrome OS super-secret terminal, commonly known as the Crosh terminal. Remember you are in Developer Mode; hence you need to be extra careful with the commands you run not to brick your Chrome operating system.
Now enter the proper shell environment by executing the command below:
shell
Note: this command will not run if you are not in Developer Mode. Hence ensure you switch to Developer Mode before proceeding with the installation process, as stated earlier in this article.
Once the shell command loads, we shall change the directory it is pointing to by running the command below:
cd ~/Downloads
Note: The folder indicated in the command above will point to the directory where we downloaded our Anaconda installer.
It is always vital to understand that Chrome OS has many restrictions, including running or executing files. Hence to evade this error, we shall use the command line provided below:
sudo mount -o remount,rw -o exec ~
This command will allow file execution to the Home directory.
The above command will occasionally fail, bringing up this error message “bad option or not mounted.” If you face such an error, then you have to rerun the command with these additional asterisks at the end with no spaces /.. your command will resemble the one shown below:
sudo mount -o remount,rw -o exec ~ /..
Note: if the command fails even after adding /.., don’t give up rerun the command until you get a different error or it works. Some developers have encountered this issue, and they overcame the error by rerunning the command severally. Therefore, don’t shy off to trying it out.
You are now ready to proceed with Anaconda installations. Execute the command below to install Anaconda on your operating system.
bash Anaconda3-2021.05-Linux-x86_64.sh
Note: Remember to replace “Anaconda3-2021.05-Linux-x86_64.sh” with the name of the Anaconda version you downloaded in the previous section.
Once the above command is fully executed, you will see a list of Legal information. Scroll through to the bottom and agree to the terms and conditions.
Proceed with the installation process by pressing “Enter” on your keyboard to choose the default Anaconda Installation location. Now give the installer time to install all the necessary prerequisites. Once the whole process is done, you can now enjoy coding with Anaconda.
After a successful competition, you will receive an output similar asking you to enable the conda command. Type Yes to be able to use the conda command.
Note: On some occasions, the installer might complete the installation without asking you to enable the conda command. If this is your case, don’t freak out, you are still on the right track.
Lastly, you might receive a prompt asking if you want to install VS Code (Visual Studio Code) or not. VS Code is an open-source and accessible code editor developed and owned by Microsoft and is compatible with major operating systems, including Linux.
Depending on your preferences, you can decide whether to download and install the code editor or not. If you have a decision, either type “Yes or No” to proceed.
Note: Every time you restart the terminal or your Chrome operating system, you must rerun the “sudo mount -o remount,rw -o exec ~” command. This will enable you to run python on your Chrome OS. However, if you plan on using Anaconda for long-term purposes, use this trick to automate the process.
Run this command on your terminal to open the vim editor.
vim ~/.bashrc
Now edit the content by going into insert mode. This can be quickly done by pressing i on your keyboard. Next, add the command above below this comment “# Put your fun stuff here.” Now you should have an output similar to the one displayed below:
Once you are done, save and exit the vim editor by pressing the ESC button on your keyboard and typing:
:wq
The w command will save while the q command will quit the vim editor.
To prove that the command we added to the bash editor works, open a new terminal window using the Ctrl + Alt + T combinations and run the shell command. We hope it worked. If not, remove the command we added to the .bashrc and rerun the command manually.
How to update Anaconda on Chrome OS
You can update Anaconda on Chrome OS by running the command below:
conda update conda
However, if you plan on updating to a specific version, then you will have to specify the version number in the command line as shown in the syntax below:
conda update anaconda=versionNumber
Example:
conda update anaconda=2020.11
Note: The above command will remove packages that have been discontinued on the new version you are updating to. Also, metapackages are replaced. Therefore, you should first read the documentation on the more recent releases to be acquainted with the necessary info before updating.
If you run the command below:
conda update --all
It will update Anaconda to the latest available version in the market. Therefore, it will update everything in your current environment. Besides, it drops all the constraints of the current version and tries as much as possible to make everything new, just like the more recent version.
Therefore, reliant on your preference, you can decide which will suit you best.
Conclusion
This article has covered all the processes involved in installing and updating Anaconda on Chrome OS. We believe by now you are in a position to download, install and update Anaconda on your Chrome OS. If you feel we left out an additional tip, please feel free to engage us via the comments section. Also, if you encounter any challenges, please feel free to reach out for help. Thank you for reading.
3 comments
hi there im having some installation problems in my personal hp chromebook.
I’m getting the following error:
[/home/chronos/user/anaconda3] >>>
PREFIX=/home/chronos/user/anaconda3
Unpacking payload …
/home/chronos/user/anaconda3/conda.exe: error while loading shared libraries: /tmp/_MEIuNKUYB/libz.so.1: file not located on exec mount
I have exactly the same problem. It’s a shame the author hasn’t replied.
Found the solution online, you need to do the following in the command line:
mkdir /home/chronos/user/tmpconda
TMPDIR=/home/chronos/user/tmpconda bash (anaconda installer name) -u
The issue is that it doesn’t have permission to write to the temp folder. The first line creates a new folder it can write to, and the second line sets the installer to use that file, and update the installation (rather than start a fresh one, remove the “-u” if you uninstalled it already)
found the solution here: https://stackoverflow.com/questions/60106630/conda-exe-error-while-loading-shared-libraries-libz-so-1