尝试在MS Windows上运行时出现“ mlflow ui”错误

时间:2018-07-14 05:34:06

标签: python windows fcntl mlflow

我运行mlflow ui时发生以下错误:

Traceback (most recent call last):
  File "c:\anaconda3\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\anaconda3\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Anaconda3\Scripts\gunicorn.exe\__main__.py", line 5, in <module>
  File "c:\anaconda3\lib\site-packages\gunicorn\app\wsgiapp.py", line 9, in <module>
    from gunicorn.app.base import Application
  File "c:\anaconda3\lib\site-packages\gunicorn\app\base.py", line 12, in <module>
    from gunicorn import util
  File "c:\anaconda3\lib\site-packages\gunicorn\util.py", line 9, in <module>
    import fcntl
ModuleNotFoundError: No module named 'fcntl'
Traceback (most recent call last):
  File "c:\anaconda3\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\anaconda3\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Anaconda3\Scripts\mlflow.exe\__main__.py", line 9, in <module>
  File "c:\anaconda3\lib\site-packages\click\core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "c:\anaconda3\lib\site-packages\click\core.py", line 697, in main
    rv = self.invoke(ctx)
  File "c:\anaconda3\lib\site-packages\click\core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "c:\anaconda3\lib\site-packages\click\core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "c:\anaconda3\lib\site-packages\click\core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "c:\anaconda3\lib\site-packages\mlflow\cli.py", line 131, in ui
    mlflow.server._run_server(file_store, file_store, host, port, 1)
  File "c:\anaconda3\lib\site-packages\mlflow\server\__init__.py", line 48, in _run_server
    env=env_map, stream_output=True)
  File "c:\anaconda3\lib\site-packages\mlflow\utils\process.py", line 38, in exec_cmd
    raise ShellCommandException("Non-zero exitcode: %s" % (exit_code))
mlflow.utils.process.ShellCommandException: Non-zero exitcode: 1

我使用了anaconda + python 3.6.5,并安装了git并使用C:\Program Files\Git\bin\git.exeC:\Program Files\Git\cmd设置路径。

我安装了mlflowpip install mlflow,版本为0.2.1.。

我在环境变量中设置了一个名称为GIT_PYTHON_GIT_EXECUTABLE且值为C:\Program Files\Git\bin\git.exe的变量。

我该如何解决?

2 个答案:

答案 0 :(得分:0)

mlflow documentation已经说过

  

注意2:我们当前不支持在Windows上运行MLflow 。   尽管如此,我们将不胜感激做出MLflow的任何贡献   在Windows上可以更好地工作。

您遇到fcntl问题:它在MS Windows平台上不可用,因为它是fcntl function周围的“包装器”,在兼容POSIX的系统上可用。 (有关更多详细信息,请参见https://stackoverflow.com/a/1422436/236007。)

要解决此问题,需要相应地修改mlflow的源代码。

答案 1 :(得分:0)

首先卸载'mlflow'和'waittress',然后再次安装'mlflow'。现在尝试它的工作