首页 > 解决方案 > Windows 上出现“mlflow ui”的 fcntl 错误 - mlflow 1.0

问题描述

尝试 mlflow 示例并运行“mlflow ui”时,我收到以下错误消息。

错误:

ModuleNotFoundError: No module named 'fcntl' 运行 mlflow 服务器失败。有关详细信息,请参阅上面的日志

有人知道这个问题的解决方案吗?

我已经尝试了https://github.com/mlflow/mlflow/pull/1080建议的解决方案

没有成功。替换 mlflow 源代码中修改后的文件,它会引发其他问题,因为找不到它正在寻找的内容如下:

Traceback (most recent call last):
  File "c:\programdata\anaconda3\envs\thesis_mlflow\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\programdata\anaconda3\envs\thesis_mlflow\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\ProgramData\Anaconda3\envs\thesis_mlflow\Scripts\mlflow.exe\__main__.py", line 9, in <module>
  File "c:\programdata\anaconda3\envs\thesis_mlflow\lib\site-packages\click\core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "c:\programdata\anaconda3\envs\thesis_mlflow\lib\site-packages\click\core.py", line 717, in main
    rv = self.invoke(ctx)
  File "c:\programdata\anaconda3\envs\thesis_mlflow\lib\site-packages\click\core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "c:\programdata\anaconda3\envs\thesis_mlflow\lib\site-packages\click\core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "c:\programdata\anaconda3\envs\thesis_mlflow\lib\site-packages\click\core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "c:\programdata\anaconda3\envs\thesis_mlflow\lib\site-packages\mlflow\cli.py", line 198, in ui
    _run_server(backend_store_uri, default_artifact_root, "127.0.0.1", port, None, 1)
  File "c:\programdata\anaconda3\envs\thesis_mlflow\lib\site-packages\mlflow\server\__init__.py", line 90, in _run_server
    exec_cmd(full_command, env=env_map, stream_output=True)
  File "c:\programdata\anaconda3\envs\thesis_mlflow\lib\site-packages\mlflow\utils\process.py", line 34, in exec_cmd
    stdin=subprocess.PIPE, **kwargs)
  File "c:\programdata\anaconda3\envs\thesis_mlflow\lib\subprocess.py", line 729, in __init__
    restore_signals, start_new_session)
  File "c:\programdata\anaconda3\envs\thesis_mlflow\lib\subprocess.py", line 1017, in _execute_child
    startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified

标签: pythonwindowsmlflow

解决方案


刚刚解决了这个问题:由于某种原因,运行环境中没有安装waitress。安装后,使用上面问题中链接的解决方案 #1080 似乎一切正常。


推荐阅读