Here in this tutorial, we will learn the steps to install open source Anaconda Navigator on WSL- Windows Subsystem for Linux – Windows 10 using Ubuntu 20.04/18.04 Linux App.
Although Anaconda Navigator by default is available for Windows 10 in the executable file format. However, if you still want to install it on the Linux interface that is running on WSL 1 or WSL 2 Linux Apps such as Ubuntu, then that is possible as well.
If you want to know about the Anaconda, it is essential software that has been developed to use with Python and other scientific packages and their dependencies, such as conda. It supports Linux, Mac, and Windows systems, and can easily solve the coexistence, switching and various third-party packages of multiple versions of Python.
The installation of Anaconda is quite easy and those don’t want to deal with the command-line interface to install packages, various dependencies, and create an environment it also offers the Graphical user interface called Anaconda Navigator…
Once Anaconda is installed, python, conda, numpy, scipy, pandas, and other common scientific computing packages that may be used in general are installed, without the need to download the configuration separately. Due to the split of python3 and python2, using virtualenv to configure with pip, it is often very handy.
Install Anaconda Navigator on WSL Ubuntu app for Windows 10
Those are familiar with the working of Linux they would already know the installation process of Anaconda on WSL 1 or 2, however, the key thing is how to access its graphical user interface i.e Navigator. And that you will know here.
Enable WSL and Install Ubuntu App
Those are new to WSL – Windows 10 Subsystem for Linux they must know that the Ubuntu Linux App we download from the Microsoft store will not work until and unless the WSL feature is not enabled on the system. Therefore, I am assuming that you have already activated and downloaded the WSL along with the Linux app to run over it. However, if not then follow this tutorial: How to enable the Windows subsystem for Linux feature
Open Ubuntu Linux APP
Now, go to the search box and type Ubuntu. Select the version 20.04 or 18.04, whatever available on your Windows 10 to be used with WSL.
Update and Upgrade WSL app
Before moving further let’s make sure already existing packages on the Linux system are up to date and have their latest state. For that simply run:
sudo apt update
sudo apt upgrade
Download Anaconda Navigator
Open the browser of your Windows 10 system and go to the official website of Anaconda to download it, here is the link for the same. Scroll to the bottom, right-click on the Linux 64-Bit (x86) Installer, and copy its link.
After that get back to Ubuntu WSL app, type
wget and paste the link, for example:
Wait for some time until it won’t get completely downloaded on your system. The size of the script will be around 550 MB, thus it would take some time depending on the internet connection you have.
Run the installer script
Now we have the Anaconda Installer script, let’s run to trigger the installation process. type
You will see the downloaded file.
./ with filename
Example, the name of the file we downloaded in this tutorial is Anaconda3-2020.07-Linux-x86_64.sh, thus the installation command will be:
bash Anaconda3-2020.07-Linux-x86_64.sh or ./Anaconda3-2020.07-Linux-x86_64.sh
Accept the License terms
The installer will get activated and ask you to press the Enter key in order to start the process. When the License Term appears, either read it using the Enter key or just skip the same by simply press the ‘q’ key on the keyboard.
After that type Yes to accept the terms and conditions.
Select the Installation directory
By default, the Anaconda Navigator on Linux will create the installation folder under the home directory of the system. Thus, you can let it use the same. However, if you want to use some other place on the system then assigned that path and then press the Return key.
Wait for few minutes until the process of setting up Anaconda Navigator on WSL Ubuntu has not been completed. Once done move to the next step.
Reload the Shell
Instead of closing the Ubuntu WSL app to make sure the installation will take place effectively, simply reload the shell. For that:
Start using the Anaconda on WSL Ubuntu
Now you can start using the command-line interface for creating the Anaconda environment with different packages for the various projects without interfering one and another. Well, those would like to have the Graphical User interface go to the next step.
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-h2s' qt.qpa.screen: QXcbConnection: Could not connect to display Coulld not connect to any X display.
Run Anaconda Navigotr GUI on WSL
As we know by default, the WSL will not let you open the Graphical Apps straight on the default shell screen, However, there is an alternate way of doing that.
Go to MobaXterm and download it. This is a lightweight software that comes with various inbuilt tools to access SSH server, VNC, SFTP, Command Terminal, and more.
- Open the MobaXterm, once you have that on your system.
- Click on the Session option given in the Menu of its.
- Select WSL available at the end of the tools menu.
- From Basic WSL Setting, click on the Dropdown box and select Ubuntu and press the OK button.
- Now you will see your Ubuntu WSL app on MobaXterm, great.
- There, simply type:
- That’s it, this will open the graphical user interface of the Anaconda running on Ubuntu WSL app of Windows 10.
- Start creating environments and Installation of different packages directly from the GUI of Navigator.