I'm trying to run a Jupyter notebook. I installed Anaconda 5.3 with the Python 3.7 version. The notebook starts up, but the Kernel fails to run because it's pointing to another version of Tornado that I've installed for some of my ROS projects (output below). How do I ensure the Jupyter kernel is using Tornado installed in the Anaconda path?
[I 10:56:54.649 NotebookApp] KernelRestarter: restarting kernel (4/5), new random ports
Traceback (most recent call last):
File "/dir/anaconda3/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/dir/anaconda3/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/dir/anaconda3/lib/python3.7/site-packages/ipykernel_launcher.py", line 16, in <module>
app.launch_new_instance()
File "/dir/anaconda3/lib/python3.7/site-packages/traitlets/config/application.py", line 657, in launch_instance
app.initialize(argv)
File "<decorator-gen-123>", line 2, in initialize
File "/dir/anaconda3/lib/python3.7/site-packages/traitlets/config/application.py", line 87, in catch_config_error
return method(app, *args, **kwargs)
File "/dir/anaconda3/lib/python3.7/site-packages/ipykernel/kernelapp.py", line 467, in initialize
self.init_sockets()
File "/dir/anaconda3/lib/python3.7/site-packages/ipykernel/kernelapp.py", line 260, in init_sockets
self.init_iopub(context)
File "/dir/anaconda3/lib/python3.7/site-packages/ipykernel/kernelapp.py", line 268, in init_iopub
self.iopub_thread = IOPubThread(self.iopub_socket, pipe=True)
File "/dir/anaconda3/lib/python3.7/site-packages/ipykernel/iostream.py", line 66, in __init__
self.io_loop = IOLoop(make_current=False)
File "/dir/ros_projects/forked/rosbridge_suite/rosbridge_server/src/tornado/util.py", line 208, in __new__
instance.initialize(**args)
File "/dir/ros_projects/forked/rosbridge_suite/rosbridge_server/src/tornado/platform/epoll.py", line 26, in initialize
super(EPollIOLoop, self).initialize(impl=select.epoll(), **kwargs)
TypeError: initialize() got an unexpected keyword argument 'make_current'
[W 10:56:57.665 NotebookApp] KernelRestarter: restart failed
[W 10:56:57.666 NotebookApp] Kernel 2dd183ff-850d-4f79-945c-c8f56f1e695e died, removing from map.
A little late, but answering my own question. PYTHONPATH was set for a bunch of other projects. Since conda doesn't set PYTHONPATH, running
unset PYTHONPATH
did the trick.
Related
I'm trying to teach myself to use the beeware briefcase package for Python, although having issues setting it up. I've got pyenv installed, and my local python version in the root of my project is set to 3.8.9. I'm using windows and Powershell
In PowerShell, I've created the python virtual environment, and have installed briefcase via pip.
I've installed git as well, and linked the repo to github.
When I try to run "briefcase new", and go through the prompts, I receive the following traceback (for both powershell and gitbash):
(I've removed my root details in below errors)
Traceback (most recent call last):
File "C:\~\.pyenv\pyenv-win\versions\3.8.9\lib\runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\~\.pyenv\pyenv-win\versions\3.8.9\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\~\CodeProjects\beeware-tutorial\.venv\Scripts\briefcase.exe\__main__.py", line 7, in <module>
File "c:\~\codeprojects\beeware-tutorial\.venv\lib\site-packages\briefcase\__main__.py", line 14, in main
command(**options)
File "c:\~\codeprojects\beeware-tutorial\.venv\lib\site-packages\briefcase\commands\new.py", line 537, in __call__
return self.new_app(template=template, **options)
File "c:\~\codeprojects\beeware-tutorial\.venv\lib\site-packages\briefcase\commands\new.py", line 488, in new_app
cached_template = self.update_cookiecutter_cache(
File "c:\~\codeprojects\beeware-tutorial\.venv\lib\site-packages\briefcase\commands\base.py", line 569, in update_cookiecutter_cache
f"Using existing template (sha {head.commit.hexsha}, "
File "c:\~\codeprojects\beeware-tutorial\.venv\lib\site-packages\git\refs\symbolic.py", line 217, in _get_commit
obj = self._get_object()
File "c:\~\codeprojects\beeware-tutorial\.venv\lib\site-packages\git\refs\symbolic.py", line 210, in _get_object
return Object.new_from_sha(self.repo, hex_to_bin(self.dereference_recursive(self.repo, self.path)))
File "c:\~\codeprojects\beeware-tutorial\.venv\lib\site-packages\git\objects\base.py", line 85, in new_from_sha
oinfo = repo.odb.info(sha1)
File "c:\~\codeprojects\beeware-tutorial\.venv\lib\site-packages\git\db.py", line 43, in info
hexsha, typename, size = self._git.get_object_header(bin_to_hex(binsha))
File "c:\~\codeprojects\beeware-tutorial\.venv\lib\site-packages\git\cmd.py", line 1253, in get_object_header
return self.__get_object_header(cmd, ref)
File "c:\~\codeprojects\beeware-tutorial\.venv\lib\site-packages\git\cmd.py", line 1240, in __get_object_header
return self._parse_object_header(cmd.stdout.readline())
File "c:\~\codeprojects\beeware-tutorial\.venv\lib\site-packages\git\cmd.py", line 1198, in _parse_object_header
raise ValueError("SHA could not be resolved, git returned: %r" % (header_line.strip()))
ValueError: SHA could not be resolved, git returned: b''
Not sure how I managed to fix the issue but I uninstalled git version 2.37.1 and installed git version 2.30.2, used GitBash to create a new environment, and installed a briefcase.
Seems to have solved the issue.
For now I was only using python 2.7 (installed for all users, added to path, windows 10 machine) but I want to switch to 3.8, to be able to use both of them I first installed virtualenv in my system python 2.7.
Then installed python 3.8.1 for all user without adding it to path.
Created my virtualenv like that : virtualenv c:\virtualEnvs\p38x64_jupytertest -p C:\Python38-32\python.exe
then activated it : C:\virtualEnvs\p38x64_jupytertest\Scripts\activate.bat
checked if python 3.8.1 was selected with : python --version (it was)
then installed jupyter inside my virtualenv : pip install jupyter
Then when I ran jupyter notebook I got
Traceback (most recent call last):
File "C:\Python38-32\Lib\runpy.py", line 193, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Python38-32\Lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "c:\virtualEnvs\p38x64_jupytertest3\Scripts\jupyter-notebook.EXE\__main__.py", line 7, in <module>
File "c:\virtualenvs\p38x64_jupytertest3\lib\site-packages\jupyter_core\application.py", line 268, in launch_instance
return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
File "c:\virtualenvs\p38x64_jupytertest3\lib\site-packages\traitlets\config\application.py", line 663, in launch_instance
app.initialize(argv)
File "<c:\virtualenvs\p38x64_jupytertest3\lib\site-packages\decorator.py:decorator-gen-7>", line 2, in initialize
File "c:\virtualenvs\p38x64_jupytertest3\lib\site-packages\traitlets\config\application.py", line 87, in catch_config_error
return method(app, *args, **kwargs)
File "c:\virtualenvs\p38x64_jupytertest3\lib\site-packages\notebook\notebookapp.py", line 1720, in initialize
self.init_webapp()
File "c:\virtualenvs\p38x64_jupytertest3\lib\site-packages\notebook\notebookapp.py", line 1482, in init_webapp
self.http_server.listen(port, self.ip)
File "c:\virtualenvs\p38x64_jupytertest3\lib\site-packages\tornado\tcpserver.py", line 152, in listen
self.add_sockets(sockets)
File "c:\virtualenvs\p38x64_jupytertest3\lib\site-packages\tornado\tcpserver.py", line 165, in add_sockets
self._handlers[sock.fileno()] = add_accept_handler(
File "c:\virtualenvs\p38x64_jupytertest3\lib\site-packages\tornado\netutil.py", line 279, in add_accept_handler
io_loop.add_handler(sock, accept_handler, IOLoop.READ)
File "c:\virtualenvs\p38x64_jupytertest3\lib\site-packages\tornado\platform\asyncio.py", line 99, in add_handler
self.asyncio_loop.add_reader(fd, self._handle_events, fd, IOLoop.READ)
File "C:\Python38-32\Lib\asyncio\events.py", line 501, in add_reader
raise NotImplementedError
NotImplementedError
After some googling I find a lot of tutorial that explain how to install jupyter in you system python then add virtualenvs to it, but not how to install it INSIDE a virtual env.
The reason I did that is because I want my python 3 project to be isolated since I have a lot of python 2.7 projects (up until now I was not using virtualenv and every package is installed in my system python 2.)
Any idea of why I have this exception?
Thanks.
PS : yes it says p38x64_jupytertest3 in the stacktrace because the venv is not p38x64_jupytertest but p38x64_jupytertest3 in fact
know issue : https://github.com/jupyter/notebook/issues/4613
Reverting to python 3.7 for the moment
I am struggling with running Jupyter Notebook on PyCharm2018 Community Edition in Windows 10. I created a Virtual Environment with python version 3.6.6 and other necessary packages. I installed jupyter notebook (ipython-7.8.0v, jupyter-1.0.0v) as well following its documentation. As, I am using a specific python version for this application, I want to create a separate ipython kernel (version 5.1.2) for python 3 in a specific path and then add it to jupyter kernelspecs as follows:
ipython kernel install --prefix /tmp
jupyter kernelspec install /tmp/share/jupyter/kernels/python3
When I run an example ipython notebook after following these instructions, the notebook is returning Kernel Error problem stating Could not find a kernel matching Python 2 . I am unable to understand, why its resulting in this. There is no trace of python2 being used anywhere during my installation. I even created python3 kernels separately using above instructions and changed my notebook to kernel to that, but still the same Kernel Error. Virtual Environment I created for this application also uses python3.6 exec file from my Anaconda Installation.
I have looked around similar questions on this problem, but none of them could help me solve this so far. The back trace of this error is as follows.
Traceback (most recent call last):
File "D:\Anaconda3\envs\python36\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "D:\Anaconda3\envs\python36\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "D:\***\pycharm_workspace\trail\venv\lib\site-packages\ipykernel_launcher.py", line 16, in <module>
app.launch_new_instance()
File "D:\***\pycharm_workspace\trail\venv\lib\site-packages\traitlets\config\application.py", line 663, in launch_instance
app.initialize(argv)
File "<D:\***\pycharm_workspace\trail\venv\lib\site-packages\decorator.py:decorator-gen-125>", line 2, in initialize
File "D:\***\pycharm_workspace\trail\venv\lib\site-packages\traitlets\config\application.py", line 87, in catch_config_error
return method(app, *args, **kwargs)
File "D:\***\pycharm_workspace\trail\venv\lib\site-packages\ipykernel\kernelapp.py", line 472, in initialize
self.write_connection_file()
File "D:\***\pycharm_workspace\trail\venv\lib\site-packages\ipykernel\kernelapp.py", line 199, in write_connection_file
iopub_port=self.iopub_port, control_port=self.control_port)
File "D:\***\pycharm_workspace\trail\venv\lib\site-packages\jupyter_client\connect.py", line 141, in write_connection_file
with secure_write(fname) as f:
File "D:\Anaconda3\envs\python36\lib\contextlib.py", line 81, in __enter__
return next(self.gen)
File "D:\**\pycharm_workspace\trail\venv\lib\site-packages\jupyter_core\paths.py", line 404, in secure_write
win32_restrict_file_to_user(fname)
File "D:\**\pycharm_workspace\trail\venv\lib\site-packages\jupyter_core\paths.py", line 359, in win32_restrict_file_to_user
import win32api
**ImportError: DLL load failed: The specified procedure could not be found.**
Thanks in advance for the help.
I have previously used Jupyter Notebook (python 2 and 3) on my mac. After not using it for a while, there seems to be a problem I am unable to fix. When starting the notebook from terminal using the command Jupyter notebook, and then select a notebook I want to work with, I get the error:
"A connection to the notebook server could not be established. The notebook will continue trying to reconnect. Check your network connection or notebook server configuration."
I am positive this has nothing to do with my internet connection (I have tried 2 machines connected to different networks).
I have read that the browser could be the problem, therefore I have installed Chrome and Firefox. However, I get this error when I am using Safari, Chrome, and Firefox.
Then I read about it being a proxy issue. I have tried to add the server address of the notebook to the No proxy fields of the advanced network preferences of my mac, and of the advanced setting on Firefox.
The only thing I can think of is that I am entering the wrong server address?
I do not know much about setting and errors in general, hopefully someone can provide me with some alternative options to get Jupyter working again.
Terminal output:
ValueError: signal only works in main thread
ERROR:tornado.application:Exception in callback <functools.partial object at 0x111e2b208>
Traceback (most recent call last):
File "/Users/xxx/anaconda2/lib/python2.7/site-packages/tornado/ioloop.py", line 759, in _run_callback
ret = callback()
File "/Users/xxx/anaconda2/lib/python2.7/site-packages/tornado/stack_context.py", line 276, in null_wrapper
return fn(*args, **kwargs)
File "/Users/xxx/anaconda2/lib/python2.7/site-packages/zmq/eventloop/zmqstream.py", line 536, in <lambda>
self.io_loop.add_callback(lambda : self._handle_events(self.socket, 0))
File "/Users/xxx/anaconda2/lib/python2.7/site-packages/zmq/eventloop/zmqstream.py", line 450, in _handle_events
self._handle_recv()
File "/Users/xxx/anaconda2/lib/python2.7/site-packages/zmq/eventloop/zmqstream.py", line 480, in _handle_recv
self._run_callback(callback, msg)
File "/Users/xxx/anaconda2/lib/python2.7/site-packages/zmq/eventloop/zmqstream.py", line 432, in _run_callback
callback(*args, **kwargs)
File "/Users/xxx/anaconda2/lib/python2.7/site-packages/tornado/stack_context.py", line 276, in null_wrapper
return fn(*args, **kwargs)
File "/Users/xxx/anaconda2/lib/python2.7/site-packages/ipykernel/kernelbase.py", line 283, in dispatcher
return self.dispatch_shell(stream, msg)
File "/Users/xxx/anaconda2/lib/python2.7/site-packages/ipykernel/kernelbase.py", line 233, in dispatch_shell
self.pre_handler_hook()
File "/Users/xxx/anaconda2/lib/python2.7/site-packages/ipykernel/kernelbase.py", line 248, in pre_handler_hook
self.saved_sigint_handler = signal(SIGINT, default_int_handler)
ValueError: signal only works in main thread
[I 19:03:26.685 NotebookApp] KernelRestarter: restarting kernel (1/5), new random ports
Traceback (most recent call last):
File "/Users/xxx/anaconda2/lib/python2.7/runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/Users/xxx/anaconda2/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/Users/xxx/anaconda2/lib/python2.7/site-packages/ipykernel_launcher.py", line 16, in <module>
app.launch_new_instance()
File "/Users/xxx/anaconda2/lib/python2.7/site-packages/traitlets/config/application.py", line 658, in launch_instance
app.start()
File "/Users/xxx/anaconda2/lib/python2.7/site-packages/ipykernel/kernelapp.py", line 477, in start
ioloop.IOLoop.instance().start()
File "/Users/xxx/anaconda2/lib/python2.7/site-packages/tornado/ioloop.py", line 928, in start
raise RuntimeError("IOLoop is already running")
RuntimeError: IOLoop is already running
[I 19:03:29.696 NotebookApp] KernelRestarter: restarting kernel (2/5), new random ports
Traceback (most recent call last):
File "/Users/xxx/anaconda2/lib/python2.7/runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/Users/xxx/anaconda2/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/Users/xxx/anaconda2/lib/python2.7/site-packages/ipykernel_launcher.py", line 16, in <module>
app.launch_new_instance()
File "/Users/xxx/anaconda2/lib/python2.7/site-packages/traitlets/config/application.py", line 658, in launch_instance
app.start()
File "/Users/xxx/anaconda2/lib/python2.7/site-packages/ipykernel/kernelapp.py", line 477, in start
ioloop.IOLoop.instance().start()
File "/Users/xxx/anaconda2/lib/python2.7/site-packages/tornado/ioloop.py", line 928, in start
raise RuntimeError("IOLoop is already running")
RuntimeError: IOLoop is already running
[I 19:03:32.712 NotebookApp] KernelRestarter: restarting kernel (3/5), new random ports
Traceback (most recent call last):
File "/Users/xxx/anaconda2/lib/python2.7/runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/Users/xxx/anaconda2/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/Users/xxx/anaconda2/lib/python2.7/site-packages/ipykernel_launcher.py", line 16, in <module>
app.launch_new_instance()
File "/Users/xxx/anaconda2/lib/python2.7/site-packages/traitlets/config/application.py", line 658, in launch_instance
app.start()
File "/Users/xxx/anaconda2/lib/python2.7/site-packages/ipykernel/kernelapp.py", line 477, in start
ioloop.IOLoop.instance().start()
File "/Users/xxx/anaconda2/lib/python2.7/site-packages/tornado/ioloop.py", line 928, in start
raise RuntimeError("IOLoop is already running")
RuntimeError: IOLoop is already running
[W 19:03:33.717 NotebookApp] Timeout waiting for kernel_info reply from 2cf24420-719b-4666-ad9f-fcdf8db505f3
[E 19:03:33.721 NotebookApp] Uncaught exception in /api/kernels/2cf24420-719b-4666-ad9f-fcdf8db505f3/channels
Traceback (most recent call last):
File "/Users/xxx/anaconda2/lib/python2.7/site-packages/tornado/websocket.py", line 498, in _run_callback
result = callback(*args, **kwargs)
File "/Users/xxx/anaconda2/lib/python2.7/site-packages/notebook/services/kernels/handlers.py", line 262, in open
super(ZMQChannelsHandler, self).open()
File "/Users/xxx/anaconda2/lib/python2.7/site-packages/notebook/base/zmqhandlers.py", line 176, in open
self.send_ping, self.ping_interval, io_loop=loop,
TypeError: __init__() got an unexpected keyword argument 'io_loop'
[E 19:03:34.749 NotebookApp] Uncaught exception in /api/kernels/2cf24420-719b-4666-ad9f-fcdf8db505f3/channels
Traceback (most recent call last):
File "/Users/xxx/anaconda2/lib/python2.7/site-packages/tornado/websocket.py", line 498, in _run_callback
result = callback(*args, **kwargs)
File "/Users/xxx/anaconda2/lib/python2.7/site-packages/notebook/services/kernels/handlers.py", line 262, in open
super(ZMQChannelsHandler, self).open()
File "/Users/xxx/anaconda2/lib/python2.7/site-packages/notebook/base/zmqhandlers.py", line 176, in open
self.send_ping, self.ping_interval, io_loop=loop,
TypeError: __init__() got an unexpected keyword argument 'io_loop'
[I 19:03:35.724 NotebookApp] KernelRestarter: restarting kernel (4/5), new random ports
[E 19:03:35.771 NotebookApp] Uncaught exception in /api/kernels/2cf24420-719b-4666-ad9f-fcdf8db505f3/channels
Traceback (most recent call last):
File "/Users/xxx/anaconda2/lib/python2.7/site-packages/tornado/websocket.py", line 498, in _run_callback
result = callback(*args, **kwargs)
File "/Users/xxx/anaconda2/lib/python2.7/site-packages/notebook/services/kernels/handlers.py", line 262, in open
super(ZMQChannelsHandler, self).open()
File "/Users/xxx/anaconda2/lib/python2.7/site-packages/notebook/base/zmqhandlers.py", line 176, in open
self.send_ping, self.ping_interval, io_loop=loop,
TypeError: __init__() got an unexpected keyword argument 'io_loop'
Traceback (most recent call last):
File "/Users/xxx/anaconda2/lib/python2.7/runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/Users/xxx/anaconda2/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/Users/xxx/anaconda2/lib/python2.7/site-packages/ipykernel_launcher.py", line 16, in <module>
app.launch_new_instance()
File "/Users/xxx/anaconda2/lib/python2.7/site-packages/traitlets/config/application.py", line 658, in launch_instance
app.start()
File "/Users/xxx/anaconda2/lib/python2.7/site-packages/ipykernel/kernelapp.py", line 477, in start
ioloop.IOLoop.instance().start()
File "/Users/xxx/anaconda2/lib/python2.7/site-packages/tornado/ioloop.py", line 928, in start
raise RuntimeError("IOLoop is already running")
RuntimeError: IOLoop is already running
[E 19:03:36.791 NotebookApp] Uncaught exception in /api/kernels/2cf24420-719b-4666-ad9f-fcdf8db505f3/channels
Traceback (most recent call last):
File "/Users/xxx/anaconda2/lib/python2.7/site-packages/tornado/websocket.py", line 498, in _run_callback
result = callback(*args, **kwargs)
File "/Users/xxx/anaconda2/lib/python2.7/site-packages/notebook/services/kernels/handlers.py", line 262, in open
super(ZMQChannelsHandler, self).open()
File "/Users/xxx/anaconda2/lib/python2.7/site-packages/notebook/base/zmqhandlers.py", line 176, in open
self.send_ping, self.ping_interval, io_loop=loop,
TypeError: __init__() got an unexpected keyword argument 'io_loop'
[E 19:03:37.810 NotebookApp] Uncaught exception in /api/kernels/2cf24420-719b-4666-ad9f-fcdf8db505f3/channels
Traceback (most recent call last):
File "/Users/xxx/anaconda2/lib/python2.7/site-packages/tornado/websocket.py", line 498, in _run_callback
result = callback(*args, **kwargs)
File "/Users/xxx/anaconda2/lib/python2.7/site-packages/notebook/services/kernels/handlers.py", line 262, in open
super(ZMQChannelsHandler, self).open()
File "/Users/xxx/anaconda2/lib/python2.7/site-packages/notebook/base/zmqhandlers.py", line 176, in open
self.send_ping, self.ping_interval, io_loop=loop,
TypeError: __init__() got an unexpected keyword argument 'io_loop'
[W 19:03:38.733 NotebookApp] KernelRestarter: restart failed
[W 19:03:38.733 NotebookApp] Kernel 2cf24420-719b-4666-ad9f-fcdf8db505f3 died, removing from map.
[W 19:03:38.830 NotebookApp] 404 GET /api/kernels/2cf24420-719b-4666-ad9f-fcdf8db505f3/channels?session_id=3F75F379F865488D8379D3BB7FC0BF0F (::1): Kernel does not exist: 2cf24420-719b-4666-ad9f-fcdf8db505f3
[W 19:03:38.838 NotebookApp] 404 GET /api/kernels/2cf24420-719b-4666-ad9f-fcdf8db505f3/channels?session_id=3F75F379F865488D8379D3BB7FC0BF0F (::1) 12.00ms referer=None
[W 19:03:40.859 NotebookApp] Replacing stale connection: 2cf24420-719b-4666-ad9f-fcdf8db505f3:3F75F379F865488D8379D3BB7FC0BF0F
Running the following version of jupyter and tornado seemed to solve the issue:
Jupyter: 4.4.0
Tornado: 4.5.3
I needed to downgrade my version of tornado (which was 5.0.2)
I faced this problem too. My problem was because of a custom module name. I named the module 'copy.py.' My issue was solved when I renamed it.
I found a way out, Installing Python on my PC solved it. I didn't install python before installing anaconda
I was also facing the kernal related issues and all my problems were solved by installing jupyter notebook from anaconda navigator.
So,The best way to handle jupyter notebook related problems is to install jupyter notebook from anaconda navigator for your environment in which you want to run jupyter notebook. If you will install jupyter notebook from anaconda navigator then you will not face any problem.
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?
firstly Uninstall 'mlflow' and 'waitress', then again install 'mlflow' .Now try it works
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.