PredictionIO:安装后找不到Pio命令

时间:2015-05-23 20:30:44

标签: bash command predictionio

我猜测PredictionIO不能正确设置路径变量。

我使用方法2从此链接安装PredictionIO:PredictionIO

所有内容都安装正确,但当我输入pio时,它说命令未找到。这就是我所看到的:

enter image description here

当我尝试从finder启动pio时,我得到了这个:

enter image description here

enter image description here

有点迷茫,我在这里做错了什么?

2 个答案:

答案 0 :(得分:6)

解决方案是编辑PATH环境变量。您可以直接在shell中执行此操作:

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

但是只要会话持续,它就会被设置。要使其永久化,您必须编辑bash配置文件。我不知道它是如何在MacOS上调用的。在我的Ubuntu上,它是.profile文件。它通常是.profile,或.bash_profile或类似的东西。

$ PATH可能在此文件中设置,因此找到位置并进行编辑。

我的.profile文件中有一部分内容为:

# 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

我会将其更改为(即使它看起来很奇怪,因为它混合了你的MacOS路径和我的Ubuntu路径):

# 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

答案 1 :(得分:2)

要实现这一点,我只需执行以下操作,这适用于Mac Yosemite用户。

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

假设您在该特定目录中安装了PredictionIO

旁注:我真的不喜欢初学者/半初学者在某些领域有如此多的玩世不恭,它让我对StackOverFlow提出质疑。

相关问题