python - 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
解决方案
刚刚解决了这个问题:由于某种原因,运行环境中没有安装waitress。安装后,使用上面问题中链接的解决方案 #1080 似乎一切正常。
推荐阅读
- spring - 如何知道有多少个连接与 SpringBoot 网站连接?
- c++ - 使用 Xcode 和 Eclipse 在 Mac Mojave 上的着色器编译问题
- spring-data-redis - 如何在 Spring-Data-Redis 中为 RedisTemplate 使用连接事件?
- python - 如何在 Python 的 googleapis-common-protos 中使用 proto 文件?
- c++ - 使用指向 class::method 的指针数组调用方法
- azure - 让 Azure DevOps 审查 GitHub 拉取请求
- netlogo - 如何让特定补丁上的海龟做某事
- python - 如何更新模型并对这个对象或其他对象做一些事情?
- python - 为什么设置一个元素值会改变 Python 2d 矩阵中其他元素的值
- html - CSS 网格 + srcset + 尺寸适用于多种宽度和屏幕分辨率?