8

I am trying to run jupyter notebook in windows 10 PC.
After installing miniconda and installed required library, I ran jupyter notebook and got following error.
I have been using jupyter notebook for few years and this is first time to see this error.
Does anyone came across this or know how to solve?

  File "C:\Users\katsuya.obara\AppData\Local\Continuum\miniconda3\envs\py35\Scripts\jupyter-notebook-script.py", line 6, in <module>
    from notebook.notebookapp import main
  File "C:\Users\katsuya.obara\AppData\Local\Continuum\miniconda3\envs\py35\lib\site-packages\notebook\notebookapp.py", line 83, in <module>
    from .services.contents.manager import ContentsManager
  File "C:\Users\katsuya.obara\AppData\Local\Continuum\miniconda3\envs\py35\lib\site-packages\notebook\services\contents\manager.py", line 17, in <module>
    from nbformat import sign, validate as validate_nb, ValidationError
  File "C:\Users\katsuya.obara\AppData\Local\Continuum\miniconda3\envs\py35\lib\site-packages\nbformat\__init__.py", line 33, in <module>
    from .validator import validate, ValidationError
  File "C:\Users\katsuya.obara\AppData\Local\Continuum\miniconda3\envs\py35\lib\site-packages\nbformat\validator.py", line 12, in <module>
    from jsonschema import ValidationError
  File "C:\Users\katsuya.obara\AppData\Local\Continuum\miniconda3\envs\py35\lib\site-packages\jsonschema\__init__.py", line 12, in <module>
    from jsonschema.exceptions import (
  File "C:\Users\katsuya.obara\AppData\Local\Continuum\miniconda3\envs\py35\lib\site-packages\jsonschema\exceptions.py", line 141, in <module>
    @attr.s(hash=True)
AttributeError: module 'attr' has no attribute 's'
Katsuya Obara
  • 903
  • 3
  • 14
  • 30

4 Answers4

7

I believe the error will be solved if you install attrs which actually contains both the above mentioned packages.

$ pip uninstall attr
$ pip install attrs

But for that first you would need to uninstall your attr and then install attrs. It should work as expected after the above changes.

DeshDeep Singh
  • 1,817
  • 2
  • 23
  • 43
3

Please refer this link for detailed answer for the solution.

https://stackoverflow.com/a/61074103/10362801

Just run below 2 commands in admin mode

pip uninstall attr

conda install --force attrs

Shiv948
  • 469
  • 5
  • 13
0

I got the same problem and solved it by downgrading the attrs module to 19.2.0

dhk429
  • 1
  • 1
    this shouldn't matter, `jsonschema` is compatible with the latest `attrs` and `attr.s` has been present in every version that `jsonschema` can install against -- you might've change something else while upgrading / downgrading? – anthony sottile Dec 30 '19 at 00:27
0

pip3 install --upgrade setuptools --user solved the problem for me.

Hope this helps.

Nizam
  • 340
  • 1
  • 6
  • 11