Can't use Jupyter Notebook: jsonschema apparently missing

前端 未结 7 1154
独厮守ぢ
独厮守ぢ 2020-12-06 12:06

When using a an Anaconda environment, I can\'t start Jupyter to work in a notebook. I can do so without the environment, but I need to be able to use the environment. Here

相关标签:
7条回答
  • 2020-12-06 12:25

    I had the same problem.

    I solved it by running this command

    conda install -c anaconda jsonschema
    

    https://anaconda.org/anaconda/jsonschema

    0 讨论(0)
  • 2020-12-06 12:26

    I think I have a solution.

    I did may things, regenerated my env (anaconda env) from another computer where it worked, but no success.

    What I think that nailed it is upgrading jsonschema to 2.5.1

    Here are my steps from "bad" jupyter env to working jupyter env.

    Good luck and come back if it doesn't work, I will post the notebook* relevant versions.

    >conda upgrade pip
    pip:        8.1.0-py27_0  --> 8.1.1-py27_0
    setuptools: 20.2.2-py27_0 --> 20.3-py27_0 
    
    >pip install functools32
    Downloading functools32-3.2.3-2.tar.gz    
    Successfully installed functools32-3.2.3.post2
    
    >jupyter notebook
    ImportError: No module named _version
    Jupyter notebook format depends on the jsonschema package:
        https://pypi.python.org/pypi/jsonschema
    Please install it first.
    
    >pip install jsonschema
    Requirement already satisfied
    
    >pip install --upgrade jsonschema
    Collecting jsonschema
    Downloading jsonschema-2.5.1-py2.py3-none-any.whl
    Successfully uninstalled jsonschema-2.4.0
    Successfully installed jsonschema-2.5.1
    
    >jupyter notebook
    [I 16:45:41.708 NotebookApp] Writing notebook server cookie secret to 
    [I 16:45:42.134 NotebookApp] Serving notebooks from local directory: 
    [I 16:45:42.134 NotebookApp] 0 active kernels 
    [I 16:45:42.134 NotebookApp] The Jupyter Notebook is running at: http://localhost:8888/
    
    0 讨论(0)
  • 2020-12-06 12:27

    Try this from terminal, it worked to me:

    pip install --upgrade pyrsistent
    
    0 讨论(0)
  • 2020-12-06 12:30

    I solved it by just uninstalling and reinstalling python 3.7

    0 讨论(0)
  • 2020-12-06 12:34

    i also got the same error and none of the above mentioned procedures worked for me so i've checked the documentation of anaconda and found something useful

    conda install -c conda-forge/label/cf201901 jsonschema

    conda install jupyter

    jupyter notebook

    this worked for me,thanks to anaconda documentation

    0 讨论(0)
  • 2020-12-06 12:36

    If any of the above mentioned solution didn't work then try this in your anaconda prompt: First run conda update -n root conda so you have the latest conda version installed. Then run conda update --all This will update all packages in the current environment to the latest version. Even after installing jsonschema, your Jupyter Notebook might not run and give you the error:

    Jupyter notebook format depends on the jsonschema package:

    https://pypi.python.org/pypi/jsonschema

    Please install it first Then I suggest you to run the given two commands. It will solve your issue as it solved mine.

    0 讨论(0)
提交回复
热议问题