简体   繁体   中英

Error starting the Jupyter notebook on Windows

When I write jupyter notebook on my on command prompt, I get an error on cmd while running jupyter. I don't understand why this is happening again and again. Therefore, it blocks to open jupyter editor in the browser. I have added all environment variables as usual, but it's not working yet. Could you please help to solve this? Any kinds of suggestions are welcome.

H:\Research\NLP\NLP Task 1>jupyter notebook
Traceback (most recent call last):
  File "C:\Users\Imran\Anaconda3\lib\site-packages\notebook\nbextensions.py", line 18, in <module>
    from urllib.request import urlretrieve
  File "C:\Users\Imran\AppData\Local\Programs\Python\Python36-32\Lib\urllib\request.py", line 88, in <module>
    import http.client
  File "C:\Users\Imran\AppData\Local\Programs\Python\Python36-32\Lib\http\client.py", line 71, in <module>
    import email.parser
  File "C:\Users\Imran\AppData\Local\Programs\Python\Python36-32\Lib\email\parser.py", line 12, in <module>
    from email.feedparser import FeedParser, BytesFeedParser
  File "C:\Users\Imran\AppData\Local\Programs\Python\Python36-32\Lib\email\feedparser.py", line 27, in <module>
    from email._policybase import compat32
  File "C:\Users\Imran\AppData\Local\Programs\Python\Python36-32\Lib\email\_policybase.py", line 9, in <module>
    from email.utils import _has_surrogates
  File "C:\Users\Imran\AppData\Local\Programs\Python\Python36-32\Lib\email\utils.py", line 29, in <module>
    import socket
  File "C:\Users\Imran\AppData\Local\Programs\Python\Python36-32\Lib\socket.py", line 49, in <module>
    import _socket
ImportError: DLL load failed: %1 is not a valid Win32 application.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\Imran\Anaconda3\Scripts\jupyter-notebook-script.py", line 6, in <module>
    from notebook.notebookapp import main
  File "C:\Users\Imran\Anaconda3\lib\site-packages\notebook\__init__.py", line 25, in <module>
    from .nbextensions import install_nbextension
  File "C:\Users\Imran\Anaconda3\lib\site-packages\notebook\nbextensions.py", line 20, in <module>
    from urlparse import urlparse
ModuleNotFoundError: No module named 'urlparse'

I uninstall python and anaconda. Then i reinstall it again. And it works again.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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