mlflow: error with “mlflow ui” at windows

when i run mlflow ui this 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 solve this

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 2
  • Comments: 17 (4 by maintainers)

Commits related to this issue

Most upvoted comments

Are there any plans to have Windows supported for the mlflow ui ? I am also experiencing a problem with fcntl.

...
ModuleNotFoundError: No module named 'fcntl'
Running the mlflow server failed. Please see the logs above for details.

@ghizmodave @ecrtmt I finally figure it out! To anyone who might be still stuck here: Here is what I do: Before starting:

  1. make sure you don’t have another mlflow installed by pip. Best solution is to creeate a new env in your conda

Process

  1. download the code of https://github.com/akshaya-a/mlflow/tree/ak/replace-gunicorn-with-waitress
  2. in your cmd(if you use conda env activate it beforehand, maybe you need to install a new pip as well for your new env) pip install /path/to/the.zip
  3. mlflow ui in you cmd, and check your browser of localhost:5000 an “not found” error will be returned , that’s normal because there is no code for frontend in the code you download 😕
  4. install mlflow(pypi version) with your system pip not the conda one: pip install mlflow go to site-packgas of your sys pip and copy a dir named js in mlflow/server, its path should look like this: “toyoursyspip/site-packages/mlflow/server/js” , makesure that there is a dir named “build” inside.
  5. copy the js dir to the dir of mlflow you just installed by pip(if you used new env in conda, it would be in a dir like /path/to/your/conda/envs/yourEnvName/Lib/site-packages/mlflow/server)
  6. relaunch the mlflow by mlflow ui, Done!
  7. I hate to develop in windows, I am turning back to my linux now. 😕

I think #1080 would resolve these issues – @akshaya-a in case he gets time to update the PR.

Had this same problem

Thanks for the ping @aarondav - currently looking to close out Tomas’ comments this week!

Hi, do you have any updates?