Fix assertion failure in jupyter

I tried to create a shell with jupyter in it and got this assertion error

E       AssertionError: assert '/nix/store/c....9/bin/python' == '/nix/store/'
E         Skipping 58 identical leading characters in diff, use -v to show
E         - /bin/python3.10
E         ?            ----
E         + /bin/python

What do I do with this?
I’m running

 - system: `"aarch64-darwin"`
 - host os: `Darwin 22.2.0, macOS 13.1`
 - multi-user?: `yes`
 - sandbox: `no`
 - version: `nix-env (Nix) 2.12.0`
 - channels(root): `"nixpkgs"`
 - channels(weethet): `"darwin"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixpkgs`

Looks like jupyter asserts the interpreter used.
Nix strips python3.10 to python at some point but it is still the same interpreter and can be ignored.
You could start python with -O to skip the assertion. To

Sorry, I didn’t quite understand. I have the following shell.nix:

{ pkgs ? import <nixpkgs> {} }:
  pythonPackages = p: with p; [
  nlpPython = pkgs.python3.withPackages pythonPackages;
in nlpPython.env

And when I try to enter it I get this error. Could you please help me with that?

You should be able to pass the -O flag to the start script to ignore it. The root of the problem needs to be fixed in the package, likely by just removing the assert.