2

When I run mlflow ui the following error occurred:

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

I used anaconda + python 3.6.5 and I installed git and set path with C:\Program Files\Git\bin\git.exe and C:\Program Files\Git\cmd.

I installed mlflow whit pip install mlflow and its version is 0.2.1.

I set a variable with name GIT_PYTHON_GIT_EXECUTABLE and value C:\Program Files\Git\bin\git.exe in Environment Variables.

How can I solve this?

Emre Sevinç
  • 8,211
  • 14
  • 64
  • 105
Tavakoli
  • 1,303
  • 3
  • 18
  • 36
  • You might be hitting the following issue related to `fcntl`: https://stackoverflow.com/a/1422436/236007 – Emre Sevinç Jul 17 '18 at 14:02
  • And `fcntl` problem might be one of the reasons why they wrote "Note 2: We do not currently support running MLflow on Windows. Despite this, we would appreciate any contributions to make MLflow work better on Windows." at https://github.com/databricks/mlflow – Emre Sevinç Jul 17 '18 at 14:04

3 Answers3

3

firstly Uninstall 'mlflow' and 'waitress', then again install 'mlflow' .Now try it works

0

mlflow documentation already says that

Note 2: We do not currently support running MLflow on Windows. Despite this, we would appreciate any contributions to make MLflow work better on Windows.

You're hitting fcntl problem: it's not available on MS Windows platform because it's a "wrapper" around the fcntl function that's available on POSIX-compatible systems. (See https://stackoverflow.com/a/1422436/236007 for more details.)

Solving this requires modifying the source code of mlflow accordingly.

Emre Sevinç
  • 8,211
  • 14
  • 64
  • 105
  • 1
    [Here](https://databricks.com/blog/2019/06/06/announcing-the-mlflow-1-0-release.html) in 5th para of "what's new", they claim Windows is now compatible but still we have the same issue. – Vasim Jul 11 '19 at 04:28
  • Note that the mentioned documentaion page is of an archived beta version fork from https://github.com/mlflow/mlflow. – gevra Dec 05 '22 at 08:55
0

I was having the same problem, these steps work for me:

  • pip uninstall mlflow
  • pip -m virtualenv env-name
  • pip install conda
  • pip install mlflow
  • mlflow ui --> INFO:waitress:Serving on http://127.0.0.1:5000
kodi
  • 51
  • 9