gpt4 book ai didi

bash - PredictionIO:安装后找不到 Pio 命令

转载 作者:行者123 更新时间:2023-11-29 09:09:34 27 4
gpt4 key购买 nike

我猜测 PredictionIO 没有正确设置路径变量。

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

一切都安装正确,但是当我输入 pio 时,它说找不到命令。这是我看到的:

enter image description here

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

enter image description here

enter image description here

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

最佳答案

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

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

然而,只要 session 持续,它就会被设置。要使其永久化,您必须编辑 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

关于bash - PredictionIO:安装后找不到 Pio 命令,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30417280/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com