Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PredictionIO: Pio command not found after install

I am guessing that somehow PredictionIO didn't setup the path variables properly.

I used method 2 to install PredictionIO from this link here: PredictionIO

Everything installed correctly but when I typed in pio it says command not found. This is what I see:

enter image description here

When I try to start pio from finder I get this:

enter image description here

enter image description here

Kind of lost, what am I doing wrong here?

like image 248
AndyRoid Avatar asked May 23 '15 20:05

AndyRoid


2 Answers

The solution is to edit your PATH environment variable. You can do it directly in the shell:

$ export PATH=/Users/yourname/PredictionIO/bin:$PATH

However it will be set only as long as the session lasts. To make it permanent, you have to edit your bash profile file. I don't know how it is called on MacOS. On my Ubuntu, it is the .profile file. It is usually .profile, or .bash_profile or something like that.

$PATH is probably set in this file, so find where and edit.

My .profile file has a part in it that reads:

# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
    PATH="$HOME/bin:/opt/java/jdk1.8.0_45/bin:$PATH"
fi

I would change it to (even though it looks weird because it mixes your MacOS path and my Ubuntu ones):

# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
    PATH="$HOME/bin:/opt/java/jdk1.8.0_45/bin:/Users/yourname/PredictionIO/bin:$PATH"
fi
like image 163
Benoit Lacherez Avatar answered Nov 03 '22 00:11

Benoit Lacherez


To get this working I simply did the following, this is for Mac Yosemite users.

$ PATH=$PATH:/Users/yourname/PredictionIO/bin; export PATH

Assuming you installed PredictionIO in that specific directory

Sidenote: I really don't like that there is so much cynicism to beginner's / semi-beginner's in certain areas it really makes me question StackOverFlow.

like image 44
AndyRoid Avatar answered Nov 02 '22 22:11

AndyRoid