简体   繁体   中英

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:

在此处输入图片说明

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

在此处输入图片说明

在此处输入图片说明

Kind of lost, what am I doing wrong here?

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

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.

pio使用自己的python版本,使用你系统的python会出现问题,可以在.zshrc文件中定义别名

alias pio='~/.platformio/penv/bin/python3 ~/.platformio/penv/bin/pio'

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM