That module was removed in jsonschema 4.0. Your packages haven't been pinned to only use jsonschema 3.x, so that might happen.
For now, you can downgrade to version 3.x of the jsonschema package with
pip install -U 'jsonschema<4.0'
and things should work.
Answer from AKX on Stack OverflowThat module was removed in jsonschema 4.0. Your packages haven't been pinned to only use jsonschema 3.x, so that might happen.
For now, you can downgrade to version 3.x of the jsonschema package with
pip install -U 'jsonschema<4.0'
and things should work.
I have exactly the same problem! It was working before the release of 1.3, with the version 1.21 months a go. I found this problem to day after updateing my venv to the newest versions. Search a little more, it is a problem with the version of the jsonschema-4.0.1, go back to version 3.1.1 of jsonschema and all is running like befor, incl. the version 1.3 of bybit. Regards,
Bug: ModuleNotFoundError: No module named 'jsonschema.compat'
python - Can't use Jupyter Notebook: jsonschema apparently missing - Stack Overflow
How to get out of this double circle?
Question fixing- ModuleNotFOundError: No module named 'jsonmerge'
» pip install jsonschema
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/
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
Sorry if my questions are basic. I don't do this (python programming) on a regular basis. Only running these commands according to a README of some repository I had to set up.
My python commands are running in two circles:
-
it says I need to upgrade to 24.0. I run upgrade, and it shows I'm there. Then it says I need to upgrade again.
-
It says I'm missing jsonschema module. I installed it, reinstall only says "equirement already satisfied". But then my program still says I'm missing the module.
How do I get out of this trap? Please help!
(mypenv) myuser-mac:myprogram myuser$ ./myproduct_generator.py --fleets-dir inventory_requests/fleets -rd inventory_requests/regions -od ~/temp/finished_myproducts Traceback (most recent call last): File "/Users/myuser/Workplace/WORKDIR/repos/bootstrap-footprint/myprogram/./myproduct_generator.py", line 17, in <module> import jsonschema ModuleNotFoundError: No module named 'jsonschema' (mypenv) myuser-mac:myprogram myuser$ pip install jsonschema Requirement already satisfied: jsonschema in /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages (4.22.0) Requirement already satisfied: attrs>=22.2.0 in /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages (from jsonschema) (23.2.0) Requirement already satisfied: jsonschema-specifications>=2023.03.6 in /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages (from jsonschema) (2023.12.1) Requirement already satisfied: rpds-py>=0.7.1 in /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages (from jsonschema) (0.18.1) Requirement already satisfied: referencing>=0.28.4 in /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages (from jsonschema) (0.35.1) [notice] A new release of pip available: 22.2 -> 24.0 [notice] To update, run: python3.9 -m pip install --upgrade pip (mypenv) myuser-mac:myprogram myuser$ pip3 -V pip 24.0 from /Users/myuser/python-envs/mypenv/lib/python3.9/site-packages/pip (python 3.9) (mypenv) myuser-mac:myprogram myuser$ python3.9 -m pip install --upgrade pip Requirement already satisfied: pip in /Users/myuser/python-envs/mypenv/lib/python3.9/site-packages (24.0) #If I run above commands again, it's basically a repeat.
I've tried a ton of different things trying to get some AI art stuff working, but no matter what I have tried, I keep getting the same error whether I go through python directly, or through conda. its always in the same place. None of my friends had issues with getting it working, and even after uninstall everything (git, python, etc), and reinstalling it, nothing has changed.