Jupyter lab 4 Error implementing translation and localization to custom Jlab extension

31 views Asked by At

I'm developing a Jupyter lab 4 Extension, currently need to apply translation by using the python package jupyterlab-translate .

I created the extension following the steps in the official documentation extension tutorial .

but when I was inside the conda environment generated when trying to install the package:

pip install jupyterlab-translate

It gives me this error:

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. ipython 8.21.0 requires prompt-toolkit<3.1.0,>=3.0.41, but you have prompt-toolkit 3.0.36 which is incompatible.

Code of my index.ts extension is:


const plugin: JupyterFrontEndPlugin<void> = {
  id: 'hello_extension:plugin',
  description: 'JupyterLab extension.',
  autoStart: true,
  requires: [ITranslator, ISettingRegistry, ITranslatorConnector],
  activate: (app: JupyterFrontEnd, translator: ITranslator, settingRegistry: ISettingRegistry) => {


    const { commands } = app;
    const trans = translator.load('hello_extension');



    commands.addCommand("hello-command", {
      label: trans.__('MY LABEL'),
      caption: trans.__('MY LABEL'),
      execute: (args: any) => {
console.log("hello");
      }
    });

  }
};

export default plugin;

Btw I tried giving the version it was asking for, byt now I'm getting this error too:

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. questionary 2.0.1 requires prompt_toolkit<=3.0.36,>=2.0, but you have prompt-toolkit 3.0.41 which is incompatible.

0

There are 0 answers