r - mlflow R 安装 MLFLOW_PYTHON_BIN

标签 r mlflow system-variable

我正在尝试在 R 中安装 mlflow 并且我收到此错误消息说

mlflow::install_mlflow() Error in mlflow_conda_bin() : Unable to find conda binary. Is Anaconda installed? If you are not using conda, you can set the environment variable MLFLOW_PYTHON_BIN to the path of yourpython executable.



我已经尝试了以下
export MLFLOW_PYTHON_BIN="/usr/bin/python" 
source ~/.bashrc
echo $MLFLOW_PYTHON_BIN  -> this prints the /usr/bin/python.

或在 R 中,
sys.setenv(MLFLOW_PYTHON_BIN="/usr/bin/python")
sys.getenv() -> prints MLFLOW_PYTHON_BIN is set to /usr/bin/python.

然而,它仍然不起作用

我不想使用 conda 环境。

我如何克服这个错误?

最佳答案

install_mlflow 命令现在仅适用于 conda,对于令人困惑的消息感到抱歉。您可以:

  • 安装 conda - 这是安装和使用 mlflow 的推荐方式

  • 或者
  • 通过pip自己安装mlflow python包

  • 要自己安装 mlflow,请 pip 安装正确(匹配 R 包)python 版本的 mlflow 并设置 MLFLOW_PYTHON_BIN 环境变量以及 MLFLOW_BIN evn 变量:例如
    library(mlflow)
    system(paste("pip install -U mlflow==", mlflow:::mlflow_version(), sep=""))
    Sys.setenv(MLFLOW_BIN=system("which mlflow"))
    Sys.setenv(MLFLOW_PYTHON_BIN=system("which python"))
    

    关于r - mlflow R 安装 MLFLOW_PYTHON_BIN,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60641337/

    相关文章:

    r - 如何指定预测中的最小或最大可能值?

    string - 将字符串转换为 aes_string 的美学

    r - 修改ggplot函数外的aes列表

    python - 将 MultiLabelBinarizer 打包到 scikit-learn Pipeline 中以推理新数据

    mysql - 为什么 default_week_format 变量适用于 WEEK 但不适用于 YEARWEEK

    R:如何在 S3 类中使用和扩展 data.table

    python - 如何在 mlflow.start_run() 中获取当前的 run_id?

    python - 如何在没有服务器的情况下将 mlflow 指标和参数保存到 s3 存储桶?

    delphi - 解决来自 Win64 操作系统中 32 位应用程序的 PROGRAMFILES 变量?