简体   繁体   English

无法使用 pip 运行 jupyter notebook

[英]Can't run jupyter notebook with pip

Just trying to run jupyter notebook with pip.只是想用 pip 运行 jupyter notebook。 What the hell is happening?这到底是怎么回事? I tried to run it like this "python -m notebook", because just "jupyter notebook" or just "notebook" doesn't even get recognized.我试图像“python -m notebook”一样运行它,因为“jupyter notebook”或“notebook”甚至都无法识别。

C:\**\**>python -m notebook
Traceback (most recent call last):
  File "C:\**\**\AppData\Local\Programs\Python\Python38-32\lib\runpy.py",
line 193, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\**\**\AppData\Local\Programs\Python\Python38-32\lib\runpy.py",
line 86, in _run_code
    exec(code, run_globals)
  File "C:\**\**\AppData\Local\Programs\Python\Python38-32\lib\site-packag
es\notebook\__main__.py", line 5, in <module>
    app.launch_new_instance()
  File "C:\**\**\AppData\Local\Programs\Python\Python38-32\lib\site-packag
es\jupyter_core\application.py", line 268, in launch_instance
    return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
  File "C:\**\**\AppData\Local\Programs\Python\Python38-32\lib\site-packag
es\traitlets\config\application.py", line 663, in launch_instance
    app.initialize(argv)
  File "<C:\**\**\AppData\Local\Programs\Python\Python38-32\lib\site-packa
ges\decorator.py:decorator-gen-7>", line 2, in initialize
  File "C:\**\**\AppData\Local\Programs\Python\Python38-32\lib\site-packag
es\traitlets\config\application.py", line 87, in catch_config_error
    return method(app, *args, **kwargs)
  File "C:\**\**\AppData\Local\Programs\Python\Python38-32\lib\site-packag
es\notebook\notebookapp.py", line 1720, in initialize
    self.init_webapp()
  File "C:\**\**\AppData\Local\Programs\Python\Python38-32\lib\site-packag
es\notebook\notebookapp.py", line 1482, in init_webapp
    self.http_server.listen(port, self.ip)
  File "C:\**\**\AppData\Local\Programs\Python\Python38-32\lib\site-packag
es\tornado\tcpserver.py", line 152, in listen
    self.add_sockets(sockets)
  File "C:\**\**\AppData\Local\Programs\Python\Python38-32\lib\site-packag
es\tornado\tcpserver.py", line 165, in add_sockets
    self._handlers[sock.fileno()] = add_accept_handler(
  File "C:\**\**\AppData\Local\Programs\Python\Python38-32\lib\site-packag
es\tornado\netutil.py", line 279, in add_accept_handler
    io_loop.add_handler(sock, accept_handler, IOLoop.READ)
  File "C:\**\**\AppData\Local\Programs\Python\Python38-32\lib\site-packag
es\tornado\platform\asyncio.py", line 99, in add_handler
    self.asyncio_loop.add_reader(fd, self._handle_events, fd, IOLoop.READ)
  File "C:\**\**\AppData\Local\Programs\Python\Python38-32\lib\asyncio\eve
nts.py", line 501, in add_reader
    raise NotImplementedError
NotImplementedError

Your local installation of jupyter via pip is conflicting with your Anaconda installation.您通过 pip 本地安装的 jupyter 与您的 Anaconda 安装冲突。 There are some situations where you may need more than one instance of python (eg if you need to test code with different versions of python, or some applications require a separate instance, but you seem like you might want to limit your installations to just a single instance.在某些情况下,您可能需要多个 python 实例(例如,如果您需要使用不同版本的 python 测试代码,或者某些应用程序需要一个单独的实例,但您似乎希望将安装限制为仅一个单例。

Remember to use environments to keep your package list clean.记住使用环境来保持你的包列表干净。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM