मैं अपने ज्यूपिटर नोटबुक पर कोड चलाने में सक्षम नहीं हूं। यह कर्नेल से कनेक्ट होने को दिखाता है और फिर कनेक्ट नहीं दिखाता है। स्पाइडर और एनाकोंडा से जुड़े लोगों के साथ भी ऐसा ही है।

This is the log of the notebook
[I 15:46:35.196 NotebookApp] JupyterLab extension loaded from C:\Users\mm\Anaconda3\lib\site-packages\jupyterlab
[I 15:46:35.215 NotebookApp] JupyterLab application directory is C:\Users\mm\Anaconda3\share\jupyter\lab
[I 15:46:35.322 NotebookApp] Serving notebooks from local directory: C:\Users\mm
[I 15:46:35.322 NotebookApp] The Jupyter Notebook is running at:
[I 15:46:35.323 NotebookApp] http://localhost:8888/?token=53a396a048abbd68e66ad5dcf1cdacef2aab87ef7b8aa2b7
[I 15:46:35.323 NotebookApp]  or http://127.0.0.1:8888/?token=53a396a048abbd68e66ad5dcf1cdacef2aab87ef7b8aa2b7
[I 15:46:35.323 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 15:46:35.602 NotebookApp]

    To access the notebook, open this file in a browser:
        file:///C:/Users/mm/AppData/Roaming/jupyter/runtime/nbserver-3080-open.html
    Or copy and paste one of these URLs:
        http://localhost:8888/?token=53a396a048abbd68e66ad5dcf1cdacef2aab87ef7b8aa2b7
     or http://127.0.0.1:8888/?token=53a396a048abbd68e66ad5dcf1cdacef2aab87ef7b8aa2b7
[W 15:47:27.021 NotebookApp] Notebook Assignment_DBSCAN.ipynb is not trusted
[I 15:47:28.255 NotebookApp] Kernel started: a993bb8f-8adc-45f8-a5ca-833913a566be
Traceback (most recent call last):
  File "C:\Users\mm\Anaconda3\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "C:\Users\mm\Anaconda3\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\mm\Anaconda3\lib\site-packages\ipykernel_launcher.py", line 15, in <module>
    from ipykernel import kernelapp as app
  File "C:\Users\mm\Anaconda3\lib\site-packages\ipykernel\__init__.py", line 2, in <module>
    from .connect import *
  File "C:\Users\mm\Anaconda3\lib\site-packages\ipykernel\connect.py", line 13, in <module>
    from IPython.core.profiledir import ProfileDir
  File "C:\Users\mm\Anaconda3\lib\site-packages\IPython\__init__.py", line 55, in <module>
    from .core.application import Application
  File "C:\Users\mm\Anaconda3\lib\site-packages\IPython\core\application.py", line 25, in <module>
    from IPython.core import release, crashhandler
  File "C:\Users\mm\Anaconda3\lib\site-packages\IPython\core\crashhandler.py", line 27, in <module>
    from IPython.core import ultratb
  File "C:\Users\mm\Anaconda3\lib\site-packages\IPython\core\ultratb.py", line 112, in <module>
    from IPython.core import debugger
  File "C:\Users\mm\Anaconda3\lib\site-packages\IPython\core\debugger.py", line 47, in <module>
    from pdb import Pdb as OldPdb
  File "C:\Users\mm\Anaconda3\lib\pdb.py", line 76, in <module>
    import code
  File "C:\Users\mm\code.py", line 40
    mul_lr = linear_model.LogisticRegression(multi_class='multinomial', solver='newton-cg',max_iter =1000)
         ^
IndentationError: expected an indented block
[I 15:47:31.156 NotebookApp] KernelRestarter: restarting kernel (1/5), new random ports
Traceback (most recent call last):
  File "C:\Users\mm\Anaconda3\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "C:\Users\mm\Anaconda3\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\mm\Anaconda3\lib\site-packages\ipykernel_launcher.py", line 15, in <module>
    from ipykernel import kernelapp as app
  File "C:\Users\mm\Anaconda3\lib\site-packages\ipykernel\__init__.py", line 2, in <module>
    from .connect import *
  File "C:\Users\mm\Anaconda3\lib\site-packages\ipykernel\connect.py", line 13, in <module>
    from IPython.core.profiledir import ProfileDir
  File "C:\Users\mm\Anaconda3\lib\site-packages\IPython\__init__.py", line 55, in <module>
    from .core.application import Application
  File "C:\Users\mm\Anaconda3\lib\site-packages\IPython\core\application.py", line 25, in <module>
    from IPython.core import release, crashhandler
  File "C:\Users\mm\Anaconda3\lib\site-packages\IPython\core\crashhandler.py", line 27, in <module>
    from IPython.core import ultratb
  File "C:\Users\mm\Anaconda3\lib\site-packages\IPython\core\ultratb.py", line 112, in <module>
    from IPython.core import debugger
  File "C:\Users\mm\Anaconda3\lib\site-packages\IPython\core\debugger.py", line 47, in <module>
    from pdb import Pdb as OldPdb
  File "C:\Users\mm\Anaconda3\lib\pdb.py", line 76, in <module>
    import code
  File "C:\Users\mm\code.py", line 40
    mul_lr = linear_model.LogisticRegression(multi_class='multinomial', solver='newton-cg',max_iter =1000)
         ^
IndentationError: expected an indented block
[I 15:47:34.190 NotebookApp] KernelRestarter: restarting kernel (2/5), new random ports
Traceback (most recent call last):
  File "C:\Users\mm\Anaconda3\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "C:\Users\mm\Anaconda3\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\mm\Anaconda3\lib\site-packages\ipykernel_launcher.py", line 15, in <module>
    from ipykernel import kernelapp as app
  File "C:\Users\mm\Anaconda3\lib\site-packages\ipykernel\__init__.py", line 2, in <module>
    from .connect import *
  File "C:\Users\mm\Anaconda3\lib\site-packages\ipykernel\connect.py", line 13, in <module>
    from IPython.core.profiledir import ProfileDir
  File "C:\Users\mm\Anaconda3\lib\site-packages\IPython\__init__.py", line 55, in <module>
    from .core.application import Application
  File "C:\Users\mm\Anaconda3\lib\site-packages\IPython\core\application.py", line 25, in <module>
    from IPython.core import release, crashhandler
  File "C:\Users\mm\Anaconda3\lib\site-packages\IPython\core\crashhandler.py", line 27, in <module>
    from IPython.core import ultratb
  File "C:\Users\mm\Anaconda3\lib\site-packages\IPython\core\ultratb.py", line 112, in <module>
    from IPython.core import debugger
  File "C:\Users\mm\Anaconda3\lib\site-packages\IPython\core\debugger.py", line 47, in <module>
    from pdb import Pdb as OldPdb
  File "C:\Users\mm\Anaconda3\lib\pdb.py", line 76, in <module>
    import code
  File "C:\Users\mm\code.py", line 40
    mul_lr = linear_model.LogisticRegression(multi_class='multinomial', solver='newton-cg',max_iter =1000)
         ^
IndentationError: expected an indented block
[I 15:47:37.202 NotebookApp] KernelRestarter: restarting kernel (3/5), new random ports
Traceback (most recent call last):
  File "C:\Users\mm\Anaconda3\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "C:\Users\mm\Anaconda3\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\mm\Anaconda3\lib\site-packages\ipykernel_launcher.py", line 15, in <module>
    from ipykernel import kernelapp as app
  File "C:\Users\mm\Anaconda3\lib\site-packages\ipykernel\__init__.py", line 2, in <module>
    from .connect import *
  File "C:\Users\mm\Anaconda3\lib\site-packages\ipykernel\connect.py", line 13, in <module>
    from IPython.core.profiledir import ProfileDir
  File "C:\Users\mm\Anaconda3\lib\site-packages\IPython\__init__.py", line 55, in <module>
    from .core.application import Application
  File "C:\Users\mm\Anaconda3\lib\site-packages\IPython\core\application.py", line 25, in <module>
    from IPython.core import release, crashhandler
  File "C:\Users\mm\Anaconda3\lib\site-packages\IPython\core\crashhandler.py", line 27, in <module>
    from IPython.core import ultratb
  File "C:\Users\mm\Anaconda3\lib\site-packages\IPython\core\ultratb.py", line 112, in <module>
    from IPython.core import debugger
  File "C:\Users\mm\Anaconda3\lib\site-packages\IPython\core\debugger.py", line 47, in <module>
    from pdb import Pdb as OldPdb
  File "C:\Users\mm\Anaconda3\lib\pdb.py", line 76, in <module>
    import code
  File "C:\Users\mm\code.py", line 40
    mul_lr = linear_model.LogisticRegression(multi_class='multinomial', solver='newton-cg',max_iter =1000)
         ^
IndentationError: expected an indented block
[I 15:47:40.234 NotebookApp] KernelRestarter: restarting kernel (4/5), new random ports
Traceback (most recent call last):
  File "C:\Users\mm\Anaconda3\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "C:\Users\mm\Anaconda3\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\mm\Anaconda3\lib\site-packages\ipykernel_launcher.py", line 15, in <module>
    from ipykernel import kernelapp as app
  File "C:\Users\mm\Anaconda3\lib\site-packages\ipykernel\__init__.py", line 2, in <module>
    from .connect import *
  File "C:\Users\mm\Anaconda3\lib\site-packages\ipykernel\connect.py", line 13, in <module>
    from IPython.core.profiledir import ProfileDir
  File "C:\Users\mm\Anaconda3\lib\site-packages\IPython\__init__.py", line 55, in <module>
    from .core.application import Application
  File "C:\Users\mm\Anaconda3\lib\site-packages\IPython\core\application.py", line 25, in <module>
    from IPython.core import release, crashhandler
  File "C:\Users\mm\Anaconda3\lib\site-packages\IPython\core\crashhandler.py", line 27, in <module>
    from IPython.core import ultratb
  File "C:\Users\mm\Anaconda3\lib\site-packages\IPython\core\ultratb.py", line 112, in <module>
    from IPython.core import debugger
  File "C:\Users\mm\Anaconda3\lib\site-packages\IPython\core\debugger.py", line 47, in <module>
    from pdb import Pdb as OldPdb
  File "C:\Users\mm\Anaconda3\lib\pdb.py", line 76, in <module>
    import code
  File "C:\Users\mm\code.py", line 40
    mul_lr = linear_model.LogisticRegression(multi_class='multinomial', solver='newton-cg',max_iter =1000)
         ^
IndentationError: expected an indented block
[W 15:47:43.264 NotebookApp] KernelRestarter: restart failed
[W 15:47:43.264 NotebookApp] Kernel a993bb8f-8adc-45f8-a5ca-833913a566be died, removing from map.
[W 15:47:49.307 NotebookApp] Replacing stale connection: a993bb8f-8adc-45f8-a5ca-833913a566be:58c6e2286d514efba8596e9d46e58020
[W 15:48:13.422 NotebookApp] Replacing stale connection: a993bb8f-8adc-45f8-a5ca-833913a566be:58c6e2286d514efba8596e9d46e58020
[W 15:48:28.368 NotebookApp] Timeout waiting for kernel_info reply from a993bb8f-8adc-45f8-a5ca-833913a566be
[E 15:48:28.373 NotebookApp] Error opening stream: HTTP 404: Not Found (Kernel does not exist: a993bb8f-8adc-45f8-a5ca-833913a566be)
[W 15:48:28.378 NotebookApp] 404 GET /api/kernels/a993bb8f-8adc-45f8-a5ca-833913a566be/channels?session_id=58c6e2286d514efba8596e9d46e58020 (::1): Kernel does not exist: a993bb8f-8adc-45f8-a5ca-833913a566be
[W 15:48:28.455 NotebookApp] 404 GET /api/kernels/a993bb8f-8adc-45f8-a5ca-833913a566be/channels?session_id=58c6e2286d514efba8596e9d46e58020 (::1) 39147.31ms referer=None
[W 15:48:28.457 NotebookApp] 404 GET /api/kernels/a993bb8f-8adc-45f8-a5ca-833913a566be/channels?session_id=58c6e2286d514efba8596e9d46e58020 (::1): Kernel does not exist: a993bb8f-8adc-45f8-a5ca-833913a566be
[W 15:48:28.464 NotebookApp] 404 GET /api/kernels/a993bb8f-8adc-45f8-a5ca-833913a566be/channels?session_id=58c6e2286d514efba8596e9d46e58020 (::1) 15044.70ms referer=None
[W 15:48:32.499 NotebookApp] Replacing stale connection: a993bb8f-8adc-45f8-a5ca-833913a566be:58c6e2286d514efba8596e9d46e58020
[W 15:49:00.539 NotebookApp] Replacing stale connection: a993bb8f-8adc-45f8-a5ca-833913a566be:58c6e2286d514efba8596e9d46e58020
[W 15:49:36.554 NotebookApp] Replacing stale connection: a993bb8f-8adc-45f8-a5ca-833913a566be:58c6e2286d514efba8596e9d46e58020
[W 15:50:28.588 NotebookApp] Replacing stale connection: a993bb8f-8adc-45f8-a5ca-833913a566be:58c6e2286d514efba8596e9d46e58020
[I 15:51:44.444 NotebookApp] 302 GET /notebooks/Untitled11.ipynb?kernel_name=python3 (::1) 2.99ms
[W 15:51:52.595 NotebookApp] Replacing stale connection: a993bb8f-8adc-45f8-a5ca-833913a566be:58c6e2286d514efba8596e9d46e58020
[W 15:56:53.025 NotebookApp] Replacing stale connection: a993bb8f-8adc-45f8-a5ca-833913a566be:58c6e2286d514efba8596e9d46e58020
-2
CT-1409 23 मार्च 2020, 13:27
एक सिस्टम/कॉन्फ़िगरेशन समस्या की तरह दिखता है। मैं आपके ज्यूपिटर इंस्टॉलेशन की जांच करूंगा।
 – 
steppo
23 मार्च 2020, 13:34

1 उत्तर

सबसे बढ़िया उत्तर

आपके पास एक गड़बड़ वातावरण है, शायद विश्व स्तर पर सेट पायथनपैथ के कारण। इसमें आपका फ़ोल्डर c:\Users\mm शामिल है, जो उस फ़ोल्डर में एक ही नाम वाला पैकेज। अपने PYTHONPATH से प्रविष्टि c:\Users\mm को हटा दें।

0
Rob 23 मार्च 2020, 13:40