Today I will walk you through the steps to Install Weka on Ubuntu 20.04. The installation process is very easy and you should be able to finish the installation of Weka in less than 5 mins.
What is Weka 3?
According to the official website of Weka. Weka is a Machine Learning Software and a collection of machine learning algorithms. It contains tools for data preparation, association rules mining, visualization, etc.
Install and Setup Weka on Ubuntu 20.04
Install Java JRE and Java JDK
Now, to be able to run and use Weka, our Ubuntu System needs Java JRE and Java JDK installed. To check whether you have java installed on your system or not you can use the command given below in the terminal.
This will output the version of java installed on your ubuntu system. If you don’t have java installed then the output in the terminal will say “Command ‘java’ not found”.
Now to install java JRE on your ubuntu you will first have to update your package index using this command –
sudo apt-get update
After that you can Install Java JRE using this command –
sudo apt install default-jre -y
And you can Install Java JDK using this command –
sudo apt install default-jdk -y
Once both Java JRE and Java JDK are installed, you can verify the installation using the command “java –version” and “javac -version”.
After installing Java you can now download Weka. You can download weka using your web browser or using the terminal. I’ll show you both the ways to download weka.
Download Weka using Terminal
Before downloading Weka using the terminal, first create a new directory where we will install Weka.
To do that first make sure you are in the home directory. Use “cd ~” to change the working directory to home. After that use the command given below to create a new directory-
mkdir -p weka
Once done, you can now download Weka using wget. If you don’t have wget installed then you can install wget using this command –
sudo apt-get install wget
After that you can download the Weka zip file using the this command –
As you are currently in the Home directory, Weka Zip file will be downloaded to the Home directory and not in the downloads directory.
After downloading the zip file you’ll have to unzip the zip file. To do that use these commands to install unzip and extract the Weka zip file –
sudo apt-get install unzip
After unzipping the Weka zip, move all the files from the unzipped folder to the “weka” folder that we created in the first step.
To do that first open your file manager and go inside the unzipped weka zip file. It will be named “weka-3-8-5” go inside that folder and using your mouse select all the files stored inside of it. Then right click and select “Copy” after that go back to home directory and go inside the “weka” directory, right click and paste.
Download Weka using Web Browser
To download Weka using your web browser, first go to this link here – https://prdownloads.sourceforge.net/weka/weka-3-8-5-azul-zulu-linux.zip This is the direct download link for the Weka zip file.
If you are using Firefox browser then you’ll get a popup asking whether to “Save File” or “Open With” select Save File and click on OK, which will start the downloading.
Once the download is complete go to your Downloads directory and locate the “Weka-3-8-5-azul-zulu-linux.zip”. Right-click on the zip file and click on the Extract here option.
This will unzip the zip file. Once unzipped, right-click the unzipped file and click on “Move to”. Select the home directory and move the Weka unzipped folder to the home directory.
Now, here in the Home directory create a new folder called “weka” by right clicking > New Folder, name the folder weka and click on create.
After that, copy all the files from the “weka-3-8-5” folder to the “weka” folder.
Now once you have downloaded Weka you can start using it. First, make sure to change your working directory to the weka directory that we made using “cd weka”. After that run this command to run weka –
Once you enter this command in the terminal weka will start and you can start using it right away. Now if you want to run weka again in a new terminal window then here is the simple step to do that.
- cd weka
And that’s it, that is how you can download and install Weka Machine Learning Software on Ubuntu 20.04. If you have any questions regarding the download and installation process of weka then comment below. Thank you.