0

Hello I am Creating A New Jupyter Note Book For The First Time Following This Documentation I typed

jupyter notebook

and this is the error that i got

  File "c:\users\josti\appdata\local\programs\python\python38-32\lib\site-packages\IPython\utils\timing.py", line 27, in <module>
    import resource
ModuleNotFoundError: No module named 'resource'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:\users\josti\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:\users\josti\appdata\local\programs\python\python38-32\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "C:\Users\josti\AppData\Local\Programs\Python\Python38-32\Scripts\jupyter-notebook.EXE\__main__.py", line 7, in <module>
  File "c:\users\josti\appdata\local\programs\python\python38-32\lib\site-packages\jupyter_core\application.py", line 270, in launch_instance
    return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
  File "c:\users\josti\appdata\local\programs\python\python38-32\lib\site-packages\traitlets\config\application.py", line 663, in launch_instance
    app.initialize(argv)
  File "<decorator-gen-7>", line 2, in initialize
  File "c:\users\josti\appdata\local\programs\python\python38-32\lib\site-packages\traitlets\config\application.py", line 87, in catch_config_error
    return method(app, *args, **kwargs)
  File "c:\users\josti\appdata\local\programs\python\python38-32\lib\site-packages\notebook\notebookapp.py", line 1368, in initialize
    self.init_webapp()
  File "c:\users\josti\appdata\local\programs\python\python38-32\lib\site-packages\notebook\notebookapp.py", line 1156, in init_webapp
    self.web_app = NotebookWebApplication(
  File "c:\users\josti\appdata\local\programs\python\python38-32\lib\site-packages\notebook\notebookapp.py", line 151, in __init__
    settings = self.init_settings(
  File "c:\users\josti\appdata\local\programs\python\python38-32\lib\site-packages\notebook\notebookapp.py", line 263, in init_settings
    nbextensions_path=jupyter_app.nbextensions_path,
  File "c:\users\josti\appdata\local\programs\python\python38-32\lib\site-packages\notebook\notebookapp.py", line 874, in nbextensions_path
    from IPython.paths import get_ipython_dir
  File "c:\users\josti\appdata\local\programs\python\python38-32\lib\site-packages\IPython\__init__.py", line 49, in <module>
    from .terminal.embed import embed
  File "c:\users\josti\appdata\local\programs\python\python38-32\lib\site-packages\IPython\terminal\embed.py", line 19, in <module>
    from IPython.terminal.ipapp import load_default_config
  File "c:\users\josti\appdata\local\programs\python\python38-32\lib\site-packages\IPython\terminal\ipapp.py", line 30, in <module>
    from IPython.core.magics import ScriptMagics
  File "c:\users\josti\appdata\local\programs\python\python38-32\lib\site-packages\IPython\core\magics\__init__.py", line 21, in <module>
    from .execution import ExecutionMagics
  File "c:\users\josti\appdata\local\programs\python\python38-32\lib\site-packages\IPython\core\magics\execution.py", line 46, in <module>
    from IPython.utils.timing import clock, clock2
  File "c:\users\josti\appdata\local\programs\python\python38-32\lib\site-packages\IPython\utils\timing.py", line 64, in <module>
    clocku = clocks = clock = time.clock
AttributeError: module 'time' has no attribute 'clock'

I tried to

pip3 install --upgrade pip

Even tho i have the latest version of PIP install resource

pip install resource

and it did not work

Jostimian
  • 91
  • 6

1 Answers1

1
module 'time' has no attribute 'clock'

Are you using Python 3.8? This appears to be an issue with Python 3.8. I would suggest reverting to a older version of Python (3.7 works fine) until the libraries are resolved.

Reference:

  1. AttributeError: module 'time' has no attribute 'clock' in Python 3.8
  2. https://github.com/jupyter/notebook/issues/5272
Muntasir Wahed
  • 297
  • 2
  • 11
  • However you can check https://stackoverflow.com/questions/60966135/cant-launch-jupyter-notebook-modulenotfounderror-no-module-named-resource. A workaround is proposed here, although I have not tested it. – Muntasir Wahed Jul 08 '20 at 14:14
  • 1
    Thanks, I Reverted To Python 3.7 and it works thanks for your answer – Jostimian Jul 09 '20 at 02:07