mlflow ui 启动报错No such file or directory: 'gunicorn': 'gunicorn'

1、mlflow ui 启动报错,信息如下:

[root@localhost mlflow]# mlflow ui
/usr/local/python3/lib/python3./importlib/_bootstrap.py:: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected , got
return f(*args, **kwds)
Traceback (most recent call last):
File "/usr/bin/mlflow", line , in <module>
sys.exit(cli())
File "/usr/local/python3/lib/python3.6/site-packages/click/core.py", line , in __call__
return self.main(*args, **kwargs)
File "/usr/local/python3/lib/python3.6/site-packages/click/core.py", line , in main
rv = self.invoke(ctx)
File "/usr/local/python3/lib/python3.6/site-packages/click/core.py", line , in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/python3/lib/python3.6/site-packages/click/core.py", line , in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/python3/lib/python3.6/site-packages/click/core.py", line , in invoke
return callback(*args, **kwargs)
File "/usr/local/python3/lib/python3.6/site-packages/mlflow/cli.py", line , in ui
_run_server(file_store, file_store, host, port, , None)
File "/usr/local/python3/lib/python3.6/site-packages/mlflow/server/__init__.py", line , in _run_server
env=env_map, stream_output=True)
File "/usr/local/python3/lib/python3.6/site-packages/mlflow/utils/process.py", line , in exec_cmd
stdin=subprocess.PIPE, **kwargs)
File "/usr/local/python3/lib/python3.6/subprocess.py", line , in __init__
restore_signals, start_new_session)
File "/usr/local/python3/lib/python3.6/subprocess.py", line , in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno ] No such file or directory: 'gunicorn': 'gunicorn'

2、原因:

  mlflow启动时,会调用subprocess.PIPE创建子进程,子进程启动找不到gunicorn命令:

3、解决方法:

  创建gunicorn软连接:

ln -s /usr/local/python3/bin/gunicorn /usr/bin/gunicorn

  或者将

/usr/local/python3/bin添加到PATH,export PATH=${PATH}:/usr/local/python3/bin
上一篇:一文读懂网管协议 - SNMP,NETCONF,RESTCONF


下一篇:php连接mysql报错No such file or directory