Running Mahout Locally getting a ClassNotFoundException for MahoutDriver

I am trying to run Mahout locally (without Hadoop) on a Windows 8 machine. I understand that this is not an optimal setup, but something I need to work with.

When I try to run bin/mahout , I get the following error:

 $ bin/mahout MAHOUT_LOCAL is set, so we don't add HADOOP_CONF_DIR to classpath. no HADOOP_HOME set, running locally Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/mahout/dri ver/MahoutDriver Caused by: java.lang.ClassNotFoundException: org.apache.mahout.driver.MahoutDriv er at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) Could not find the main class: org.apache.mahout.driver.MahoutDriver. Program w ill exit. 

I tried to download the source code and install it using maven and use the pre-compiled distribution files provided here: http://www.poolsaboveground.com/apache/mahout/

I also tried using versions 0.7 and 0.6 of Mahout and got the same problem. Not sure if this has anything to do with my version of java, but I use: 1.7.0_09. I also set the environment variables MAHOUT_LOCAL = true and MAHOUT_HEAPSIZE=128

+4
source share
4 answers

I have never succeeded in running mahout from a binary package, and it looks like this is not a separate package. The easiest way is to compile the source code, which is pretty straight forward if you have Maven installed:

 mkdir mahout cd mahout/ svn co http://svn.apache.org/repos/asf/mahout/trunk cd trunk/ mvn compile mvn install export MAHOUT_LOCAL=TRUE export MAHOUT_HEAPSIZE=1000 

then you can use this very detailed example to verify that your installation is in order: http://www.cs.ucy.ac.cy/courses/EPL660/labs/Stalo/Lab8.pdf

+4
source

I only found this question, I apologize for the late answer.

I think that you can solve your problem by installing the necessary modules through Maven, as described here , with the command:

 mvn -DskipTests -X clean install 
+1
source

Have you tried installing CLASSPATH?

 export CLASSPATH=${CLASSPATH}:your_MAHOUT_HOME/mahout-distribution-0.7/lib/hadoop/hadoop-core-0.20.204.0.jar 
0
source

The problem is the mahout script shell (under bin ), which incorrectly adds lib/hadoop/* to the classpath , where it must scan the Jar files in this folder to add them to the classpath directory

-1
source

Source: https://habr.com/ru/post/1484928/


All Articles