jupyterlab / extension-examples

JupyterLab Extensions by Examples
BSD 3-Clause "New" or "Revised" License
453 stars 167 forks source link

python -m pip install -e error #261

Closed ryan-latest closed 9 months ago

ryan-latest commented 9 months ago

Description

image

This error occurred when I performed the following steps
python -m pip install  
I can't find the error, please let me know if you know, thank you

welcome[bot] commented 9 months ago

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively. welcome You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! :wave:
Welcome to the Jupyter community! :tada:

ryan-latest commented 9 months ago

image How to solve this problem, if you know please let me know, thank you

MFA-X-AI commented 9 months ago

Seems like an issue from hatch's side.

https://github.com/pypa/hatch/releases/tag/hatch-v1.8.0 Fix the project metadata command by only capturing stdout from the backend

Give it another try, I could successfully build it from my side.

ryan-latest commented 9 months ago

Seems like an issue from hatch's side.

https://github.com/pypa/hatch/releases/tag/hatch-v1.8.0 Fix the project metadata command by only capturing stdout from the backend

Give it another try, I could successfully build it from my side.

This can't be solved.

GuYith commented 9 months ago

the same bug,it was reproduced on mine different computers

MFA-X-AI commented 9 months ago

You'll have to be more specific than that for people to help then. What node version are you using? Try from a fresh pull or clone. Here's more or less what I did:

  1. Ensure you have the necessary things. I'm using py3.9 + node 18, but you should be able to use the LTS versions.
  2. clone this repo, navigate to hello-world
  3. make venv. I prefer to use the vanilla venv over conda. python3 -m venv venv && source venv/Scripts/activate
  4. Jupyterlab recommends using jlpm to build extensions, which is a locked version of yarn. Luckily it's bundled in when you install jupyterlab. So I recommend running pip install jupyterlab.
  5. Then follow their build steps
    # Install package in development mode
    pip install -e .
    # Link your development version of the extension with JupyterLab
    jupyter labextension develop . --overwrite
    # Rebuild extension Typescript source after making changes
    jlpm run build

Here's a gist for what you can get. Take note this is just for the hello world demo. :)

fcollonval commented 9 months ago

The example are mainly JavaScript based. This means you need to be able to access NPM packages repository to download the dependencies using the package manager jlpm (this is actually yarn).

From the error trace, the error is not due to hatch (it is only a tool to execute build actions) but due to yarn unable to connect to an IP. So the best is to contact your administrator to figure out how to configure yarn to access the required dependencies.

GuYith commented 9 months ago

Here is my bug logs. I'm using py3.12, node18.18.2 on windows.

Obtaining file:///D:/A_Code_Exercise/jupyterext_test/jupyterlab-extension-examples/hello-world
  Installing build dependencies ... done
  Checking if build backend supports build_editable ... done
  Getting requirements to build editable ... done
  Installing backend dependencies ... done
  Preparing editable metadata (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Preparing editable metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [39 lines of output]
      INFO:hatch_jupyter_builder.utils:Running jupyter-builder
      INFO:hatch_jupyter_builder.utils:Building with hatch_jupyter_builder.npm_builder
      INFO:hatch_jupyter_builder.utils:With kwargs: {'build_cmd': 'install:extension', 'npm': ['jlpm'], 'source_dir': 'src', 'build_dir': 'jupyterlab_examples_hello_world/labextension'}
      INFO:hatch_jupyter_builder.utils:Installing build dependencies with npm.  This may take a while...
      INFO:hatch_jupyter_builder.utils:> C:\Users\XXXX\AppData\Local\Temp\pip-build-env-wx5j2k3e\overlay\Scripts\jlpm.EXE install   
      Traceback (most recent call last):
        File "E:\Software\Anaconda\envs\jupyterlab-extension-examples\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 167, in prepare_metadata_for_build_editable
          hook = backend.prepare_metadata_for_build_editable
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      AttributeError: module 'hatchling.build' has no attribute 'prepare_metadata_for_build_editable'

      During handling of the above exception, another exception occurred:

      Traceback (most recent call last):
        File "E:\Software\Anaconda\envs\jupyterlab-extension-examples\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
          main()
        File "E:\Software\Anaconda\envs\jupyterlab-extension-examples\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "E:\Software\Anaconda\envs\jupyterlab-extension-examples\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 176, in prepare_metadata_for_build_editable
          whl_basename = build_hook(metadata_directory, config_settings)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\XXXX\AppData\Local\Temp\pip-build-env-wx5j2k3e\overlay\Lib\site-packages\hatchling\build.py", line 82, in build_editable
          return os.path.basename(next(builder.build(directory=wheel_directory, versions=['editable'])))
                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\XXXX\AppData\Local\Temp\pip-build-env-wx5j2k3e\overlay\Lib\site-packages\hatchling\builders\plugin\interface.py", line 147, in build
          build_hook.initialize(version, build_data)
        File "C:\Users\XXXX\AppData\Local\Temp\pip-build-env-wx5j2k3e\normal\Lib\site-packages\hatch_jupyter_builder\plugin.py", line 87, in initialize
          raise e
        File "C:\Users\XXXX\AppData\Local\Temp\pip-build-env-wx5j2k3e\normal\Lib\site-packages\hatch_jupyter_builder\plugin.py", line 82, in initialize
          build_func(self.target_name, version, **build_kwargs)
        File "C:\Users\XXXX\AppData\Local\Temp\pip-build-env-wx5j2k3e\normal\Lib\site-packages\hatch_jupyter_builder\utils.py", line 113, in npm_builder
          run([*npm_cmd, "install"], cwd=str(abs_path))
        File "C:\Users\XXXX\AppData\Local\Temp\pip-build-env-wx5j2k3e\normal\Lib\site-packages\hatch_jupyter_builder\utils.py", line 229, in run
          return subprocess.check_call(cmd, **kwargs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "E:\Software\Anaconda\envs\jupyterlab-extension-examples\Lib\subprocess.py", line 413, in check_call
          raise CalledProcessError(retcode, cmd)
      subprocess.CalledProcessError: Command '['C:\\Users\\XXXX\\AppData\\Local\\Temp\\pip-build-env-wx5j2k3e\\overlay\\Scripts\\jlpm.EXE', 'install']' returned non-zero exit status 1.
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

I follow steps below and meet this bug

# clone the repository
git clone https://github.com/jupyterlab/extension-examples.git jupyterlab-extension-examples

# go to the extension examples folder
cd jupyterlab-extension-examples

# create a new environment
conda env create

# activate the environment
conda activate jupyterlab-extension-examples

# go to the hello world example
cd hello-world

# install the extension in editable mode
python -m pip install -e .
ryan-latest commented 9 months ago

Here is my bug logs. I'm using py3.12, node18.18.2 on windows.

Obtaining file:///D:/A_Code_Exercise/jupyterext_test/jupyterlab-extension-examples/hello-world
  Installing build dependencies ... done
  Checking if build backend supports build_editable ... done
  Getting requirements to build editable ... done
  Installing backend dependencies ... done
  Preparing editable metadata (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Preparing editable metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [39 lines of output]
      INFO:hatch_jupyter_builder.utils:Running jupyter-builder
      INFO:hatch_jupyter_builder.utils:Building with hatch_jupyter_builder.npm_builder
      INFO:hatch_jupyter_builder.utils:With kwargs: {'build_cmd': 'install:extension', 'npm': ['jlpm'], 'source_dir': 'src', 'build_dir': 'jupyterlab_examples_hello_world/labextension'}
      INFO:hatch_jupyter_builder.utils:Installing build dependencies with npm.  This may take a while...
      INFO:hatch_jupyter_builder.utils:> C:\Users\GXyss\AppData\Local\Temp\pip-build-env-wx5j2k3e\overlay\Scripts\jlpm.EXE install   
      Traceback (most recent call last):
        File "E:\Software\Anaconda\envs\jupyterlab-extension-examples\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 167, in prepare_metadata_for_build_editable
          hook = backend.prepare_metadata_for_build_editable
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      AttributeError: module 'hatchling.build' has no attribute 'prepare_metadata_for_build_editable'

      During handling of the above exception, another exception occurred:

      Traceback (most recent call last):
        File "E:\Software\Anaconda\envs\jupyterlab-extension-examples\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
          main()
        File "E:\Software\Anaconda\envs\jupyterlab-extension-examples\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "E:\Software\Anaconda\envs\jupyterlab-extension-examples\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 176, in prepare_metadata_for_build_editable
          whl_basename = build_hook(metadata_directory, config_settings)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\GXyss\AppData\Local\Temp\pip-build-env-wx5j2k3e\overlay\Lib\site-packages\hatchling\build.py", line 82, in build_editable
          return os.path.basename(next(builder.build(directory=wheel_directory, versions=['editable'])))
                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\GXyss\AppData\Local\Temp\pip-build-env-wx5j2k3e\overlay\Lib\site-packages\hatchling\builders\plugin\interface.py", line 147, in build
          build_hook.initialize(version, build_data)
        File "C:\Users\GXyss\AppData\Local\Temp\pip-build-env-wx5j2k3e\normal\Lib\site-packages\hatch_jupyter_builder\plugin.py", line 87, in initialize
          raise e
        File "C:\Users\GXyss\AppData\Local\Temp\pip-build-env-wx5j2k3e\normal\Lib\site-packages\hatch_jupyter_builder\plugin.py", line 82, in initialize
          build_func(self.target_name, version, **build_kwargs)
        File "C:\Users\GXyss\AppData\Local\Temp\pip-build-env-wx5j2k3e\normal\Lib\site-packages\hatch_jupyter_builder\utils.py", line 113, in npm_builder
          run([*npm_cmd, "install"], cwd=str(abs_path))
        File "C:\Users\GXyss\AppData\Local\Temp\pip-build-env-wx5j2k3e\normal\Lib\site-packages\hatch_jupyter_builder\utils.py", line 229, in run
          return subprocess.check_call(cmd, **kwargs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "E:\Software\Anaconda\envs\jupyterlab-extension-examples\Lib\subprocess.py", line 413, in check_call
          raise CalledProcessError(retcode, cmd)
      subprocess.CalledProcessError: Command '['C:\\Users\\GXyss\\AppData\\Local\\Temp\\pip-build-env-wx5j2k3e\\overlay\\Scripts\\jlpm.EXE', 'install']' returned non-zero exit status 1.
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

I follow steps below and meet this bug

# clone the repository
git clone https://github.com/jupyterlab/extension-examples.git jupyterlab-extension-examples

# go to the extension examples folder
cd jupyterlab-extension-examples

# create a new environment
conda env create

# activate the environment
conda activate jupyterlab-extension-examples

# go to the hello world example
cd hello-world

# install the extension in editable mode
python -m pip install -e .

Default to the latest version, I have the same error as you

ryan-latest commented 9 months ago

I wanted to develop an extension to modify the style of the top menu, but this demo stopped me. who is going to save me

MFA-X-AI commented 9 months ago

Here is my bug logs. I'm using py3.12, node18.18.2 on windows.

Thanks for the logs. From what I understand from this comment, I think py3.12 isn't supported officially yet. I also ran into unexpected behaviour building on 3.12. Have you tried downgrading to py3.11 at least?

AttributeError: module 'hatchling.build' has no attribute 'prepare_metadata_for_build_editable'

Funnily enough, I have ran into this exact error before, hence my suggestion of updating hatch. I am unable to reproduce this error again though, even with testing with previous hatch builds. As fcollonval said, it may not be because of hatch.

GuYith commented 9 months ago

Have you tried downgrading to py3.11 at least?

Thank you very much! I tried py3.11, py3.10,py3.8, but all meet the same problem.

Funnily enough, I have ran into this exact error before, hence my suggestion of updating hatch.

What's the hatchling version you use? All packages download automatically when I run python -m pip install -e . How can I specify the version of hatch?

GuYith commented 9 months ago

Have you tried downgrading to py3.11 at least?

Thank you very much! I tried py3.11, py3.10,py3.8, but all meet the same problem.

Funnily enough, I have ran into this exact error before, hence my suggestion of updating hatch.

What's the hatchling version you use? All packages download automatically when I run python -m pip install -e . How can I specify the version of hatch?

By the way, I successfully built my environment and developed my extension a few months ago. After reinstalling anaconda, I found that command failed.

MFA-X-AI commented 9 months ago

What's the hatchling version you use? All packages download automatically when I run python -m pip install -e . How can I specify the version of hatch?

You can specify it in the pyproject.toml. I did try with hatch 1.7 and 1.8, both worked just fine, so I don't think it's because of that. I'm not using conda so could you try using the vanilla venv?

I successfully built my environment and developed my extension a few months ago.

Was that in Jupyterlab 3 or Jupyterlab 4?

GuYith commented 9 months ago

What's the hatchling version you use? All packages download automatically when I run python -m pip install -e . How can I specify the version of hatch?

You can specify it in the pyproject.toml. I did try with hatch 1.7 and 1.8, both worked just fine, so I don't think it's because of that. I'm not using conda so could you try using the vanilla venv?

I successfully built my environment and developed my extension a few months ago.

Was that in Jupyterlab 3 or Jupyterlab 4?

Thank you for your reply, I will try. It was Jupyterlab 4.

ryan-latest commented 9 months ago

(base) PS G:\demo\extensions\extension-examples-main> cd .\hello-world\ (base) PS G:\demo\extensions\extension-examples-main\hello-world> conda activate jupyterlab-extension-examples (jupyterlab-extension-examples) PS G:\demo\extensions\extension-examples-main\hello-world> (jupyterlab-extension-examples) PS G:\demo\extensions\extension-examples-main\hello-world> python -m pip install -e . Obtaining file:///G:/demo/extensions/extension-examples-main/hello-world Installing build dependencies ... done Checking if build backend supports build_editable ... done Getting requirements to build editable ... done Installing backend dependencies ... done Preparing editable metadata (pyproject.toml) ... done Building wheels for collected packages: jupyterlab_examples_hello_world Building editable for jupyterlab_examples_hello_world (pyproject.toml) ... done Created wheel for jupyterlab_examples_hello_world: filename=jupyterlab_examples_hello_world-0.1.0-py3-none-any.whl size=8010 sha256=185e49aa1bf1a070d10b3326a9e9a0885425b8a2c46514c3fbedaac8172e2bdf Stored in directory: C:\Users\Administrator\AppData\Local\Temp\pip-ephem-wheel-cache-vq3krvsx\wheels\f6\28\c8\8e523ad1da302164fe5cb4c3c91b083dc477ea7b5efe076f96 Successfully built jupyterlab_examples_hello_world Installing collected packages: jupyterlab_examples_hello_world Attempting uninstall: jupyterlab_examples_hello_world Found existing installation: jupyterlab_examples_hello_world 0.1.0 Uninstalling jupyterlab_examples_hello_world-0.1.0: Successfully uninstalled jupyterlab_examples_hello_world-0.1.0 Successfully installed jupyterlab_examples_hello_world-0.1.0 (jupyterlab-extension-examples) PS G:\demo\extensions\extension-examples-main\hello-world> (jupyterlab-extension-examples) PS G:\demo\extensions\extension-examples-main\hello-world> jupyter labextension develop . --overwrite C:\ProgramData\miniconda3\envs\jupyterlab-extension-examples\Lib\site-packages\jupyterlab\debuglog.py:56: UserWarning: An error occurred. warnings.warn("An error occurred.") C:\ProgramData\miniconda3\envs\jupyterlab-extension-examples\Lib\site-packages\jupyterlab\debuglog.py:57: UserWarning: ModuleNotFoundError: There is no labextension at .. Errors encountered: [TypeError("the 'package' argument is required to perform a relative import for '.'")] warnings.warn(msg[-1].strip()) C:\ProgramData\miniconda3\envs\jupyterlab-extension-examples\Lib\site-packages\jupyterlab\debuglog.py:58: UserWarning: See the log file for details: C:\Users\ADMINI~1\AppData\Local\Temp\jupyterlab-debug-gbyfqd4a.log warnings.warn(f"See the log file for details: {log_path!s}") (jupyterlab-extension-examples) PS G:\demo\extensions\extension-examples-main\hello-world> (jupyterlab-extension-examples) PS G:\demo\extensions\extension-examples-main\hello-world> jupyter lab --version 4.0.9 (jupyterlab-extension-examples) PS G:\demo\extensions\extension-examples-main\hello-world>

jupyter labextension develop . --overwrite When I got to this step, this error occurred again

GuYith commented 9 months ago

(base) PS G:\demo\extensions\extension-examples-main> cd .\hello-world (base) PS G:\demo\extensions\extension-examples-main\hello-world> conda activate jupyterlab-extension-examples (jupyterlab-extension-examples) PS G:\demo\extensions\extension-examples-main\hello-world> (jupyterlab-extension-examples) PS G:\demo\extensions\extension-examples-main\hello-world> python -m pip install -e . Obtaining file:///G:/demo/extensions/extension-examples-main/hello-world Installing build dependencies ... done Checking if build backend supports build_editable ... done Getting requirements to build editable ... done Installing backend dependencies ... done Preparing editable metadata (pyproject.toml) ... done Building wheels for collected packages: jupyterlab_examples_hello_world Building editable for jupyterlab_examples_hello_world (pyproject.toml) ... done Created wheel for jupyterlab_examples_hello_world: filename=jupyterlab_examples_hello_world-0.1.0-py3-none-any.whl size=8010 sha256=185e49aa1bf1a070d10b3326a9e9a0885425b8a2c46514c3fbedaac8172e2bdf Stored in directory: C:\Users\Administrator\AppData\Local\Temp\pip-ephem-wheel-cache-vq3krvsx\wheels\f6\28\c8\8e523ad1da302164fe5cb4c3c91b083dc477ea7b5efe076f96 Successfully built jupyterlab_examples_hello_world Installing collected packages: jupyterlab_examples_hello_world Attempting uninstall: jupyterlab_examples_hello_world Found existing installation: jupyterlab_examples_hello_world 0.1.0 Uninstalling jupyterlab_examples_hello_world-0.1.0: Successfully uninstalled jupyterlab_examples_hello_world-0.1.0 Successfully installed jupyterlab_examples_hello_world-0.1.0 (jupyterlab-extension-examples) PS G:\demo\extensions\extension-examples-main\hello-world> (jupyterlab-extension-examples) PS G:\demo\extensions\extension-examples-main\hello-world> jupyter labextension develop . --overwrite C:\ProgramData\miniconda3\envs\jupyterlab-extension-examples\Lib\site-packages\jupyterlab\debuglog.py:56: UserWarning: An error occurred. warnings.warn("An error occurred.") C:\ProgramData\miniconda3\envs\jupyterlab-extension-examples\Lib\site-packages\jupyterlab\debuglog.py:57: UserWarning: ModuleNotFoundError: There is no labextension at .. Errors encountered: [TypeError("the 'package' argument is required to perform a relative import for '.'")] warnings.warn(msg[-1].strip()) C:\ProgramData\miniconda3\envs\jupyterlab-extension-examples\Lib\site-packages\jupyterlab\debuglog.py:58: UserWarning: See the log file for details: C:\Users\ADMINI~1\AppData\Local\Temp\jupyterlab-debug-gbyfqd4a.log warnings.warn(f"See the log file for details: {log_path!s}") (jupyterlab-extension-examples) PS G:\demo\extensions\extension-examples-main\hello-world> (jupyterlab-extension-examples) PS G:\demo\extensions\extension-examples-main\hello-world> jupyter lab --version 4.0.9 (jupyterlab-extension-examples) PS G:\demo\extensions\extension-examples-main\hello-world>

jupyter labextension develop . --overwrite When I got to this step, this error occurred again

Wow, you run python -m pip install -e . successfully. What did you do?

MFA-X-AI commented 9 months ago

From a quick glance, it looks like you've already had an instance of the extension, so my quick recommendation would be to just clone a fresh copy of the repository and use a new venv. It also looks like you're still using conda, unfortunately that's out of my reach if you're experiencing other errors.

ofek commented 9 months ago

Responding to https://github.com/jupyterlab/extension-examples/issues/261#issuecomment-1853535468

Unfortunately the way errors are handled in pip is such that you will see all of them instead of just the actual one. The attribute error is a red herring always and you have to scroll down to see the real stuff.

krassowski commented 9 months ago

Just as a to add a datapoint, I followed the steps in README' TL;DR section and it worked smoothly, see details for the logs. Though I am currently on Ubuntu.

```sh ~$ git clone https://github.com/jupyterlab/extension-examples.git jupyterlab-extension-examples Cloning into 'jupyterlab-extension-examples'... remote: Enumerating objects: 6225, done. remote: Counting objects: 100% (2001/2001), done. remote: Compressing objects: 100% (582/582), done. remote: Total 6225 (delta 1598), reused 1481 (delta 1376), pack-reused 4224 Receiving objects: 100% (6225/6225), 23.50 MiB | 3.72 MiB/s, done. Resolving deltas: 100% (3926/3926), done. ~$ cd jupyterlab-extension-examples ~/jupyterlab-extension-examples$ conda env create Collecting package metadata (repodata.json): done Solving environment: done ==> WARNING: A newer version of conda exists. <== current version: 4.10.3 latest version: 23.11.0 Please update conda by running $ conda update -n base conda Downloading and Extracting Packages webencodings-0.5.1 | 15 KB | ##### | 100% ld_impl_linux-64-2.4 | 688 KB | ##### | 100% overrides-7.4.0 | 29 KB | ##### | 100% debugpy-1.8.0 | 2.6 MB | ##### | 100% ncurses-6.4 | 864 KB | ##### | 100% tinycss2-1.2.1 | 23 KB | ##### | 100% argon2-cffi-bindings | 34 KB | ##### | 100% jsonpointer-2.4 | 18 KB | ##### | 100% jupyter-lsp-2.2.1 | 52 KB | ##### | 100% colorama-0.4.6 | 25 KB | ##### | 100% comm-0.1.4 | 11 KB | ##### | 100% libzlib-1.2.13 | 60 KB | ##### | 100% libstdcxx-ng-13.2.0 | 3.7 MB | ##### | 100% prompt-toolkit-3.0.4 | 264 KB | ##### | 100% stack_data-0.6.2 | 26 KB | ##### | 100% pkgutil-resolve-name | 11 KB | ##### | 100% jupyter_server_termi | 19 KB | ##### | 100% prometheus_client-0. | 47 KB | ##### | 100% python-json-logger-2 | 13 KB | ##### | 100% jupyterlab_pygments- | 18 KB | ##### | 100% readline-8.2 | 275 KB | ##### | 100% exceptiongroup-1.2.0 | 20 KB | ##### | 100% jupyter_core-5.5.0 | 90 KB | ##### | 100% jsonschema-4.20.0 | 70 KB | ##### | 100% tornado-6.3.3 | 810 KB | ##### | 100% iniconfig-2.0.0 | 11 KB | ##### | 100% setuptools-68.2.2 | 454 KB | ##### | 100% typing_utils-0.1.0 | 14 KB | ##### | 100% isoduration-20.11.0 | 17 KB | ##### | 100% pytz-2023.3.post1 | 183 KB | ##### | 100% json5-0.9.14 | 24 KB | ##### | 100% libexpat-2.5.0 | 76 KB | ##### | 100% tk-8.6.13 | 3.2 MB | ##### | 100% wheel-0.42.0 | 56 KB | ##### | 100% zeromq-4.3.5 | 335 KB | ##### | 100% libgcc-ng-13.2.0 | 755 KB | ##### | 100% openssl-3.2.0 | 2.7 MB | ##### | 100% requests-2.31.0 | 55 KB | ##### | 100% nbconvert-7.12.0 | 8 KB | ##### | 100% async-lru-2.0.4 | 15 KB | ##### | 100% pyyaml-6.0.1 | 192 KB | ##### | 100% tzdata-2023c | 115 KB | ##### | 100% python-3.12.0 | 30.6 MB | ##### | 100% certifi-2023.11.17 | 155 KB | ##### | 100% webcolors-1.13 | 18 KB | ##### | 100% zipp-3.17.0 | 19 KB | ##### | 100% pexpect-4.8.0 | 48 KB | ##### | 100% nbconvert-core-7.12. | 184 KB | ##### | 100% executing-2.0.1 | 27 KB | ##### | 100% nest-asyncio-1.5.8 | 11 KB | ##### | 100% referencing-0.32.0 | 38 KB | ##### | 100% ipykernel-6.26.0 | 113 KB | ##### | 100% jupyterlab_server-2. | 48 KB | ##### | 100% notebook-shim-0.2.3 | 16 KB | ##### | 100% pytest-jupyter-0.8.0 | 21 KB | ##### | 100% fqdn-1.5.1 | 14 KB | ##### | 100% packaging-23.2 | 48 KB | ##### | 100% traitlets-5.14.0 | 107 KB | ##### | 100% rfc3339-validator-0. | 8 KB | ##### | 100% asttokens-2.4.1 | 28 KB | ##### | 100% zlib-1.2.13 | 91 KB | ##### | 100% anyio-4.1.0 | 98 KB | ##### | 100% icu-73.2 | 11.5 MB | ##### | 100% libgomp-13.2.0 | 412 KB | ##### | 100% mistune-3.0.2 | 64 KB | ##### | 100% uri-template-1.3.0 | 23 KB | ##### | 100% beautifulsoup4-4.12. | 112 KB | ##### | 100% wcwidth-0.2.12 | 32 KB | ##### | 100% jsonschema-with-form | 7 KB | ##### | 100% arrow-1.3.0 | 98 KB | ##### | 100% xz-5.2.6 | 409 KB | ##### | 100% jupyter_server-2.12. | 313 KB | ##### | 100% pyzmq-25.1.2 | 516 KB | ##### | 100% psutil-5.9.5 | 470 KB | ##### | 100% docutils-0.20.1 | 877 KB | ##### | 100% libuuid-2.38.1 | 33 KB | ##### | 100% jsonschema-specifica | 15 KB | ##### | 100% typing-extensions-4. | 10 KB | ##### | 100% pip-23.3.1 | 1.3 MB | ##### | 100% brotli-python-1.1.0 | 342 KB | ##### | 100% soupsieve-2.5 | 36 KB | ##### | 100% cffi-1.16.0 | 288 KB | ##### | 100% jupyterlab-4.0.9 | 5.1 MB | ##### | 100% libsqlite-3.44.2 | 826 KB | ##### | 100% importlib_resources- | 29 KB | ##### | 100% libuv-1.46.0 | 872 KB | ##### | 100% ca-certificates-2023 | 151 KB | ##### | 100% websocket-client-1.7 | 46 KB | ##### | 100% nbconvert-pandoc-7.1 | 7 KB | ##### | 100% markupsafe-2.1.3 | 26 KB | ##### | 100% types-python-dateuti | 21 KB | ##### | 100% terminado-0.18.0 | 22 KB | ##### | 100% python-fastjsonschem | 221 KB | ##### | 100% nbclient-0.8.0 | 63 KB | ##### | 100% pysocks-1.7.1 | 19 KB | ##### | 100% jupyter_client-8.6.0 | 103 KB | ##### | 100% bleach-6.1.0 | 128 KB | ##### | 100% libnsl-2.0.1 | 33 KB | ##### | 100% jupyter_events-0.9.0 | 21 KB | ##### | 100% pytest-7.4.3 | 239 KB | ##### | 100% urllib3-2.1.0 | 83 KB | ##### | 100% matplotlib-inline-0. | 12 KB | ##### | 100% bzip2-1.0.8 | 248 KB | ##### | 100% send2trash-1.8.2 | 22 KB | ##### | 100% gmp-6.3.0 | 550 KB | ##### | 100% cached-property-1.5. | 4 KB | ##### | 100% pygments-2.17.2 | 840 KB | ##### | 100% argon2-cffi-23.1.0 | 18 KB | ##### | 100% importlib_metadata-7 | 9 KB | ##### | 100% typing_extensions-4. | 35 KB | ##### | 100% nodejs-18.18.2 | 14.9 MB | ##### | 100% rpds-py-0.13.2 | 965 KB | ##### | 100% cached_property-1.5. | 11 KB | ##### | 100% pluggy-1.3.0 | 22 KB | ##### | 100% idna-3.6 | 49 KB | ##### | 100% sniffio-1.3.0 | 14 KB | ##### | 100% rfc3986-validator-0. | 8 KB | ##### | 100% importlib-metadata-7 | 25 KB | ##### | 100% charset-normalizer-3 | 46 KB | ##### | 100% attrs-23.1.0 | 54 KB | ##### | 100% jedi-0.19.1 | 822 KB | ##### | 100% babel-2.14.0 | 7.3 MB | ##### | 100% platformdirs-4.1.0 | 20 KB | ##### | 100% pytest-check-links-0 | 16 KB | ##### | 100% nbformat-5.9.2 | 98 KB | ##### | 100% pandoc-3.1.3 | 28.0 MB | ##### | 100% python_abi-3.12 | 6 KB | ##### | 100% ipython-8.18.1 | 577 KB | ##### | 100% Preparing transaction: done Verifying transaction: done Executing transaction: done # # To activate this environment, use # # $ conda activate jupyterlab-extension-examples # # To deactivate an active environment, use # # $ conda deactivate ~/jupyterlab-extension-examples$ conda activate jupyterlab-extension-examples (jupyterlab-extension-examples) ~/jupyterlab-extension-examples$ cd hello-world (jupyterlab-extension-examples) ~/jupyterlab-extension-examples/hello-world$ touch yarn.lock (jupyterlab-extension-examples) ~/jupyterlab-extension-examples/hello-world$ python -m pip install -e . Obtaining file:///~/jupyterlab-extension-examples/hello-world Installing build dependencies ... done Checking if build backend supports build_editable ... done Getting requirements to build editable ... done Installing backend dependencies ... done Preparing editable metadata (pyproject.toml) ... done Building wheels for collected packages: jupyterlab_examples_hello_world Building editable for jupyterlab_examples_hello_world (pyproject.toml) ... done Created wheel for jupyterlab_examples_hello_world: filename=jupyterlab_examples_hello_world-0.1.0-py3-none-any.whl size=32832 sha256=7dde0ba2a2ab18f669bcf3bc8b3dc16d1c1ab7684f1181a6f9253cdb67a4e231 Stored in directory: /tmp/pip-ephem-wheel-cache-z3mh_z5k/wheels/12/6f/cf/b34071304f8bdc318e0bfa50ca3a03314ede5eecb36174da99 Successfully built jupyterlab_examples_hello_world Installing collected packages: jupyterlab_examples_hello_world Successfully installed jupyterlab_examples_hello_world-0.1.0 (jupyterlab-extension-examples) ~/jupyterlab-extension-examples/hello-world$ jupyter labextension develop . --overwrite Installing /~/jupyterlab-extension-examples/hello-world/jupyterlab_examples_hello_world/labextension -> @jupyterlab-examples/hello-world Removing: /~/jlab_server/envs/jupyterlab-extension-examples/share/jupyter/labextensions/@jupyterlab-examples/hello-world Symlinking: /~/jlab_server/envs/jupyterlab-extension-examples/share/jupyter/labextensions/@jupyterlab-examples/hello-world -> /~/jupyterlab-extension-examples/hello-world/jupyterlab_examples_hello_world/labextension (jupyterlab-extension-examples) ~/jupyterlab-extension-examples/hello-world$ jlpm run build Building extension in . Compilation starting… Compilation finished asset style_index_js.5e5a8785a095a634f67a.js 18.9 KiB [emitted] [immutable] 1 related asset asset remoteEntry.8fcec414d8c1300ee3a4.js 16.4 KiB [emitted] [immutable] (name: @jupyterlab-examples/hello-world) 1 related asset asset lib_index_js.8b36e384112063946136.js 1020 bytes [emitted] [immutable] 1 related asset runtime modules 9.23 KiB 13 modules built modules 10.9 KiB (javascript) 42 bytes (share-init) [built] cacheable modules 10.9 KiB modules by path ./node_modules/ 8.58 KiB modules by path ./node_modules/style-loader/dist/runtime/*.js 5.84 KiB 6 modules modules by path ./node_modules/css-loader/dist/runtime/*.js 2.74 KiB ./node_modules/css-loader/dist/runtime/sourceMaps.js 505 bytes [built] [code generated] ./node_modules/css-loader/dist/runtime/api.js 2.25 KiB [built] [code generated] modules by path ./style/ 1.94 KiB ./style/index.js 21 bytes [built] [code generated] ./style/base.css 1.11 KiB [built] [code generated] ./node_modules/css-loader/dist/cjs.js!./style/base.css 829 bytes [built] [code generated] ./lib/index.js 341 bytes [built] [code generated] container entry 42 bytes [built] [code generated] provide shared module (default) @jupyterlab-examples/hello-world@0.1.0 = ...(truncated) 42 bytes [built] [code generated] webpack 5.89.0 compiled successfully in 622 ms (jupyterlab-extension-examples) ~/jupyterlab-extension-examples/hello-world$ ```
krassowski commented 9 months ago

@ryan-latest do you have symbolic link support enabled?

Quoting from https://jupyterlab.readthedocs.io/en/stable/extension/extension_tutorial.html#build-and-install-the-extension-for-development:

On Windows, symbolic links can be activated on Windows 10 or above for Python version 3.8 or higher by activating the ‘Developer Mode’. That may not be allowed by your administrators. See Activate Developer Mode on Windows for instructions.

krassowski commented 9 months ago

@GuYith can you compare the result of conda lock and pip lock against mine (see below in details):

``` $ conda list # packages in environment at ///envs/jupyterlab-extension-examples: # # Name Version Build Channel _libgcc_mutex 0.1 conda_forge conda-forge _openmp_mutex 4.5 2_gnu conda-forge anyio 4.1.0 pyhd8ed1ab_0 conda-forge argon2-cffi 23.1.0 pyhd8ed1ab_0 conda-forge argon2-cffi-bindings 21.2.0 pypi_0 pypi arrow 1.3.0 pyhd8ed1ab_0 conda-forge asttokens 2.4.1 pyhd8ed1ab_0 conda-forge async-lru 2.0.4 pyhd8ed1ab_0 conda-forge attrs 23.1.0 pyh71513ae_1 conda-forge babel 2.14.0 pyhd8ed1ab_0 conda-forge beautifulsoup4 4.12.2 pyha770c72_0 conda-forge bleach 6.1.0 pyhd8ed1ab_0 conda-forge brotli 1.1.0 pypi_0 pypi brotli-python 1.1.0 py312h30efb56_1 conda-forge bzip2 1.0.8 hd590300_5 conda-forge ca-certificates 2023.11.17 hbcca054_0 conda-forge cached-property 1.5.2 hd8ed1ab_1 conda-forge cached_property 1.5.2 pyha770c72_1 conda-forge certifi 2023.11.17 pyhd8ed1ab_0 conda-forge cffi 1.16.0 pypi_0 pypi charset-normalizer 3.3.2 pyhd8ed1ab_0 conda-forge colorama 0.4.6 pyhd8ed1ab_0 conda-forge comm 0.1.4 pyhd8ed1ab_0 conda-forge debugpy 1.8.0 pypi_0 pypi decorator 5.1.1 pyhd8ed1ab_0 conda-forge defusedxml 0.7.1 pyhd8ed1ab_0 conda-forge docutils 0.20.1 pypi_0 pypi entrypoints 0.4 pyhd8ed1ab_0 conda-forge exceptiongroup 1.2.0 pyhd8ed1ab_0 conda-forge executing 2.0.1 pyhd8ed1ab_0 conda-forge fqdn 1.5.1 pyhd8ed1ab_0 conda-forge gmp 6.3.0 h59595ed_0 conda-forge html5lib 1.1 pyh9f0ad1d_0 conda-forge icu 73.2 h59595ed_0 conda-forge idna 3.6 pyhd8ed1ab_0 conda-forge importlib-metadata 7.0.0 pyha770c72_0 conda-forge importlib_metadata 7.0.0 hd8ed1ab_0 conda-forge importlib_resources 6.1.1 pyhd8ed1ab_0 conda-forge iniconfig 2.0.0 pyhd8ed1ab_0 conda-forge ipykernel 6.26.0 pyhf8b6a83_0 conda-forge ipython 8.18.1 pyh707e725_3 conda-forge isoduration 20.11.0 pyhd8ed1ab_0 conda-forge jedi 0.19.1 pyhd8ed1ab_0 conda-forge jinja2 3.1.2 pyhd8ed1ab_1 conda-forge json5 0.9.14 pyhd8ed1ab_0 conda-forge jsonpointer 2.4 pypi_0 pypi jsonschema 4.20.0 pyhd8ed1ab_0 conda-forge jsonschema-specifications 2023.11.2 pyhd8ed1ab_0 conda-forge jsonschema-with-format-nongpl 4.20.0 pyhd8ed1ab_0 conda-forge jupyter-core 5.5.0 pypi_0 pypi jupyter-lsp 2.2.1 pyhd8ed1ab_0 conda-forge jupyter_client 8.6.0 pyhd8ed1ab_0 conda-forge jupyter_core 5.5.0 py312h7900ff3_0 conda-forge jupyter_events 0.9.0 pyhd8ed1ab_0 conda-forge jupyter_server 2.12.1 pyhd8ed1ab_0 conda-forge jupyter_server_terminals 0.5.0 pyhd8ed1ab_0 conda-forge jupyterlab 4.0.9 pyhd8ed1ab_0 conda-forge jupyterlab-examples-hello-world 0.1.0 pypi_0 pypi jupyterlab_pygments 0.3.0 pyhd8ed1ab_0 conda-forge jupyterlab_server 2.25.2 pyhd8ed1ab_0 conda-forge ld_impl_linux-64 2.40 h41732ed_0 conda-forge libexpat 2.5.0 hcb278e6_1 conda-forge libffi 3.4.2 h7f98852_5 conda-forge libgcc-ng 13.2.0 h807b86a_3 conda-forge libgomp 13.2.0 h807b86a_3 conda-forge libnsl 2.0.1 hd590300_0 conda-forge libsodium 1.0.18 h36c2ea0_1 conda-forge libsqlite 3.44.2 h2797004_0 conda-forge libstdcxx-ng 13.2.0 h7e041cc_3 conda-forge libuuid 2.38.1 h0b41bf4_0 conda-forge libuv 1.46.0 hd590300_0 conda-forge libzlib 1.2.13 hd590300_5 conda-forge markupsafe 2.1.3 pypi_0 pypi matplotlib-inline 0.1.6 pyhd8ed1ab_0 conda-forge mistune 3.0.2 pyhd8ed1ab_0 conda-forge nbclient 0.8.0 pyhd8ed1ab_0 conda-forge nbconvert 7.12.0 pyhd8ed1ab_0 conda-forge nbconvert-core 7.12.0 pyhd8ed1ab_0 conda-forge nbconvert-pandoc 7.12.0 pyhd8ed1ab_0 conda-forge nbformat 5.9.2 pyhd8ed1ab_0 conda-forge ncurses 6.4 h59595ed_2 conda-forge nest-asyncio 1.5.8 pyhd8ed1ab_0 conda-forge nodejs 18.18.2 hb753e55_1 conda-forge notebook-shim 0.2.3 pyhd8ed1ab_0 conda-forge openssl 3.2.0 hd590300_1 conda-forge overrides 7.4.0 pyhd8ed1ab_0 conda-forge packaging 23.2 pyhd8ed1ab_0 conda-forge pandoc 3.1.3 h32600fe_0 conda-forge pandocfilters 1.5.0 pyhd8ed1ab_0 conda-forge parso 0.8.3 pyhd8ed1ab_0 conda-forge pexpect 4.8.0 pyh1a96a4e_2 conda-forge pickleshare 0.7.5 py_1003 conda-forge pip 23.3.1 pyhd8ed1ab_0 conda-forge pkgutil-resolve-name 1.3.10 pyhd8ed1ab_1 conda-forge platformdirs 4.1.0 pyhd8ed1ab_0 conda-forge pluggy 1.3.0 pyhd8ed1ab_0 conda-forge prometheus_client 0.19.0 pyhd8ed1ab_0 conda-forge prompt-toolkit 3.0.42 pyha770c72_0 conda-forge psutil 5.9.5 pypi_0 pypi ptyprocess 0.7.0 pyhd3deb0d_0 conda-forge pure_eval 0.2.2 pyhd8ed1ab_0 conda-forge pycparser 2.21 pyhd8ed1ab_0 conda-forge pygments 2.17.2 pyhd8ed1ab_0 conda-forge pysocks 1.7.1 pyha2e5f31_6 conda-forge pytest 7.4.3 pyhd8ed1ab_0 conda-forge pytest-check-links 0.9.0 pyhd8ed1ab_0 conda-forge pytest-jupyter 0.8.0 pyhd8ed1ab_0 conda-forge python 3.12.0 hab00c5b_0_cpython conda-forge python-dateutil 2.8.2 pyhd8ed1ab_0 conda-forge python-fastjsonschema 2.19.0 pyhd8ed1ab_0 conda-forge python-json-logger 2.0.7 pyhd8ed1ab_0 conda-forge python_abi 3.12 4_cp312 conda-forge pytz 2023.3.post1 pyhd8ed1ab_0 conda-forge pyyaml 6.0.1 pypi_0 pypi pyzmq 25.1.2 pypi_0 pypi readline 8.2 h8228510_1 conda-forge referencing 0.32.0 pyhd8ed1ab_0 conda-forge requests 2.31.0 pyhd8ed1ab_0 conda-forge rfc3339-validator 0.1.4 pyhd8ed1ab_0 conda-forge rfc3986-validator 0.1.1 pyh9f0ad1d_0 conda-forge rpds-py 0.13.2 pypi_0 pypi send2trash 1.8.2 pyh41d4057_0 conda-forge setuptools 68.2.2 pyhd8ed1ab_0 conda-forge six 1.16.0 pyh6c4a22f_0 conda-forge sniffio 1.3.0 pyhd8ed1ab_0 conda-forge soupsieve 2.5 pyhd8ed1ab_1 conda-forge stack_data 0.6.2 pyhd8ed1ab_0 conda-forge terminado 0.18.0 pyh0d859eb_0 conda-forge tinycss2 1.2.1 pyhd8ed1ab_0 conda-forge tk 8.6.13 noxft_h4845f30_101 conda-forge tomli 2.0.1 pyhd8ed1ab_0 conda-forge tornado 6.3.3 pypi_0 pypi traitlets 5.14.0 pyhd8ed1ab_0 conda-forge types-python-dateutil 2.8.19.14 pyhd8ed1ab_0 conda-forge typing-extensions 4.9.0 hd8ed1ab_0 conda-forge typing_extensions 4.9.0 pyha770c72_0 conda-forge typing_utils 0.1.0 pyhd8ed1ab_0 conda-forge tzdata 2023c h71feb2d_0 conda-forge uri-template 1.3.0 pyhd8ed1ab_0 conda-forge urllib3 2.1.0 pyhd8ed1ab_0 conda-forge wcwidth 0.2.12 pyhd8ed1ab_0 conda-forge webcolors 1.13 pyhd8ed1ab_0 conda-forge webencodings 0.5.1 pyhd8ed1ab_2 conda-forge websocket-client 1.7.0 pyhd8ed1ab_0 conda-forge wheel 0.42.0 pyhd8ed1ab_0 conda-forge xz 5.2.6 h166bdaf_0 conda-forge yaml 0.2.5 h7f98852_2 conda-forge zeromq 4.3.5 h59595ed_0 conda-forge zipp 3.17.0 pyhd8ed1ab_0 conda-forge zlib 1.2.13 hd590300_5 conda-forge ``` ``` $ pip list Package Version Editable project location ------------------------------- ------------ ---------------------------------------------------------- anyio 4.1.0 argon2-cffi 23.1.0 argon2-cffi-bindings 21.2.0 arrow 1.3.0 asttokens 2.4.1 async-lru 2.0.4 attrs 23.1.0 Babel 2.14.0 beautifulsoup4 4.12.2 bleach 6.1.0 Brotli 1.1.0 cached-property 1.5.2 certifi 2023.11.17 cffi 1.16.0 charset-normalizer 3.3.2 colorama 0.4.6 comm 0.1.4 debugpy 1.8.0 decorator 5.1.1 defusedxml 0.7.1 docutils 0.20.1 entrypoints 0.4 exceptiongroup 1.2.0 executing 2.0.1 fastjsonschema 2.19.0 fqdn 1.5.1 html5lib 1.1 idna 3.6 importlib-metadata 7.0.0 importlib-resources 6.1.1 iniconfig 2.0.0 ipykernel 6.26.0 ipython 8.18.1 isoduration 20.11.0 jedi 0.19.1 Jinja2 3.1.2 json5 0.9.14 jsonpointer 2.4 jsonschema 4.20.0 jsonschema-specifications 2023.11.2 jupyter_client 8.6.0 jupyter_core 5.5.0 jupyter-events 0.9.0 jupyter-lsp 2.2.1 jupyter_server 2.12.1 jupyter_server_terminals 0.5.0 jupyterlab 4.0.9 jupyterlab_examples_hello_world 0.1.0 /~/jupyterlab-extension-examples/hello-world jupyterlab_pygments 0.3.0 jupyterlab_server 2.25.2 MarkupSafe 2.1.3 matplotlib-inline 0.1.6 mistune 3.0.2 nbclient 0.8.0 nbconvert 7.12.0 nbformat 5.9.2 nest-asyncio 1.5.8 notebook_shim 0.2.3 overrides 7.4.0 packaging 23.2 pandocfilters 1.5.0 parso 0.8.3 pexpect 4.8.0 pickleshare 0.7.5 pip 23.3.1 pkgutil_resolve_name 1.3.10 platformdirs 4.1.0 pluggy 1.3.0 prometheus-client 0.19.0 prompt-toolkit 3.0.42 psutil 5.9.5 ptyprocess 0.7.0 pure-eval 0.2.2 pycparser 2.21 Pygments 2.17.2 PySocks 1.7.1 pytest 7.4.3 pytest_check_links 0.9.0 pytest-jupyter 0.8.0 python-dateutil 2.8.2 python-json-logger 2.0.7 pytz 2023.3.post1 PyYAML 6.0.1 pyzmq 25.1.2 referencing 0.32.0 requests 2.31.0 rfc3339-validator 0.1.4 rfc3986-validator 0.1.1 rpds-py 0.13.2 Send2Trash 1.8.2 setuptools 68.2.2 six 1.16.0 sniffio 1.3.0 soupsieve 2.5 stack-data 0.6.2 terminado 0.18.0 tinycss2 1.2.1 tomli 2.0.1 tornado 6.3.3 traitlets 5.14.0 types-python-dateutil 2.8.19.14 typing_extensions 4.9.0 typing-utils 0.1.0 uri-template 1.3.0 urllib3 2.1.0 wcwidth 0.2.12 webcolors 1.13 webencodings 0.5.1 websocket-client 1.7.0 wheel 0.42.0 zipp 3.17.0 ```

Anything stands out?

Can you also run pip check and conda doctor to see if anything in the environment is wrong? If nothing is wrong, can you try running jlpm install:extension from hello-world and report back?

GuYith commented 9 months ago

@GuYith can you compare the result of conda lock and pip lock against mine (see below in details):

Anything stands out?

Can you also run pip check and conda doctor to see if anything in the environment is wrong? If nothing is wrong, can you try running jlpm install:extension from hello-world and report back?

Thank you! I have compared conda list and pip list details, but not found nothing special. Some lacks may due to the error, such as jupyterlab_examples_hello_world? Some different packages, maybe it's for different os?

Details

$ conda list       
# packages in environment at E:\Software\Anaconda\envs\jupyterlab-extension-examples:
#
# Name                    Version                   Build  Channel
anyio                     4.1.0              pyhd8ed1ab_0    conda-forge
argon2-cffi               23.1.0             pyhd8ed1ab_0    conda-forge
argon2-cffi-bindings      21.2.0          py312he70551f_4    conda-forge
arrow                     1.3.0              pyhd8ed1ab_0    conda-forge
asttokens                 2.4.1              pyhd8ed1ab_0    conda-forge
async-lru                 2.0.4              pyhd8ed1ab_0    conda-forge
attrs                     23.1.0             pyh71513ae_1    conda-forge
babel                     2.14.0             pyhd8ed1ab_0    conda-forge
beautifulsoup4            4.12.2             pyha770c72_0    conda-forge
bleach                    6.1.0              pyhd8ed1ab_0    conda-forge
brotli-python             1.1.0           py312h53d5487_1    conda-forge
bzip2                     1.0.8                hcfcfb64_5    conda-forge
ca-certificates           2023.11.17           h56e8100_0    conda-forge
cached-property           1.5.2                hd8ed1ab_1    conda-forge
cached_property           1.5.2              pyha770c72_1    conda-forge
certifi                   2023.11.17         pyhd8ed1ab_0    conda-forge
cffi                      1.16.0          py312he70551f_0    conda-forge
charset-normalizer        3.3.2              pyhd8ed1ab_0    conda-forge
colorama                  0.4.6              pyhd8ed1ab_0    conda-forge
comm                      0.1.4              pyhd8ed1ab_0    conda-forge
debugpy                   1.8.0           py312h53d5487_1    conda-forge
decorator                 5.1.1              pyhd8ed1ab_0    conda-forge
defusedxml                0.7.1              pyhd8ed1ab_0    conda-forge
docutils                  0.20.1          py312h2e8e312_3    conda-forge
entrypoints               0.4                pyhd8ed1ab_0    conda-forge
exceptiongroup            1.2.0              pyhd8ed1ab_0    conda-forge
executing                 2.0.1              pyhd8ed1ab_0    conda-forge
fqdn                      1.5.1              pyhd8ed1ab_0    conda-forge
html5lib                  1.1                pyh9f0ad1d_0    conda-forge
idna                      3.6                pyhd8ed1ab_0    conda-forge
importlib-metadata        7.0.0              pyha770c72_0    conda-forge
importlib_metadata        7.0.0                hd8ed1ab_0    conda-forge
importlib_resources       6.1.1              pyhd8ed1ab_0    conda-forge
iniconfig                 2.0.0              pyhd8ed1ab_0    conda-forge
ipykernel                 6.26.0             pyha63f2e9_0    conda-forge
ipython                   8.18.1             pyh7428d3b_3    conda-forge
isoduration               20.11.0            pyhd8ed1ab_0    conda-forge
jedi                      0.19.1             pyhd8ed1ab_0    conda-forge
jinja2                    3.1.2              pyhd8ed1ab_1    conda-forge
json5                     0.9.14             pyhd8ed1ab_0    conda-forge
jsonpointer               2.4             py312h2e8e312_3    conda-forge
jsonschema                4.20.0             pyhd8ed1ab_0    conda-forge
jsonschema-specifications 2023.11.2          pyhd8ed1ab_0    conda-forge
jsonschema-with-format-nongpl 4.20.0             pyhd8ed1ab_0    conda-forge
jupyter-lsp               2.2.1              pyhd8ed1ab_0    conda-forge
jupyter_client            8.6.0              pyhd8ed1ab_0    conda-forge
jupyter_core              5.5.0           py312h2e8e312_0    conda-forge
jupyter_events            0.9.0              pyhd8ed1ab_0    conda-forge
jupyter_server            2.12.1             pyhd8ed1ab_0    conda-forge
jupyter_server_terminals  0.5.0              pyhd8ed1ab_0    conda-forge
jupyterlab                4.0.9              pyhd8ed1ab_0    conda-forge
jupyterlab_pygments       0.3.0              pyhd8ed1ab_0    conda-forge
jupyterlab_server         2.25.2             pyhd8ed1ab_0    conda-forge
libexpat                  2.5.0                h63175ca_1    conda-forge
libffi                    3.4.2                h8ffe710_5    conda-forge
libsodium                 1.0.18               h8d14728_1    conda-forge
libsqlite                 3.44.2               hcfcfb64_0    conda-forge
libzlib                   1.2.13               hcfcfb64_5    conda-forge
markupsafe                2.1.3           py312he70551f_1    conda-forge
matplotlib-inline         0.1.6              pyhd8ed1ab_0    conda-forge
mistune                   3.0.2              pyhd8ed1ab_0    conda-forge
nbclient                  0.8.0              pyhd8ed1ab_0    conda-forge
nbconvert                 7.12.0             pyhd8ed1ab_0    conda-forge
nbconvert-core            7.12.0             pyhd8ed1ab_0    conda-forge
nbconvert-pandoc          7.12.0             pyhd8ed1ab_0    conda-forge
nbformat                  5.9.2              pyhd8ed1ab_0    conda-forge
nest-asyncio              1.5.8              pyhd8ed1ab_0    conda-forge
nodejs                    18.18.2              h57928b3_1    conda-forge
notebook-shim             0.2.3              pyhd8ed1ab_0    conda-forge
openssl                   3.2.0                hcfcfb64_1    conda-forge
overrides                 7.4.0              pyhd8ed1ab_0    conda-forge
packaging                 23.2               pyhd8ed1ab_0    conda-forge
pandoc                    3.1.3                h57928b3_0    conda-forge
pandocfilters             1.5.0              pyhd8ed1ab_0    conda-forge
parso                     0.8.3              pyhd8ed1ab_0    conda-forge
pickleshare               0.7.5                   py_1003    conda-forge
pip                       23.3.1             pyhd8ed1ab_0    conda-forge
pkgutil-resolve-name      1.3.10             pyhd8ed1ab_1    conda-forge
platformdirs              4.1.0              pyhd8ed1ab_0    conda-forge
pluggy                    1.3.0              pyhd8ed1ab_0    conda-forge
prometheus_client         0.19.0             pyhd8ed1ab_0    conda-forge
prompt-toolkit            3.0.42             pyha770c72_0    conda-forge
psutil                    5.9.5           py312he70551f_1    conda-forge
pure_eval                 0.2.2              pyhd8ed1ab_0    conda-forge
pycparser                 2.21               pyhd8ed1ab_0    conda-forge
pygments                  2.17.2             pyhd8ed1ab_0    conda-forge
pysocks                   1.7.1              pyh0701188_6    conda-forge
pytest                    7.4.3              pyhd8ed1ab_0    conda-forge
pytest-check-links        0.9.0              pyhd8ed1ab_0    conda-forge
pytest-jupyter            0.8.0              pyhd8ed1ab_0    conda-forge
python                    3.12.0          h2628c8c_0_cpython    conda-forge
python-dateutil           2.8.2              pyhd8ed1ab_0    conda-forge
python-fastjsonschema     2.19.0             pyhd8ed1ab_0    conda-forge
python-json-logger        2.0.7              pyhd8ed1ab_0    conda-forge
python_abi                3.12                    4_cp312    conda-forge
pytz                      2023.3.post1       pyhd8ed1ab_0    conda-forge
pywin32                   306             py312h53d5487_2    conda-forge
pywinpty                  2.0.12          py312h53d5487_0    conda-forge
pyyaml                    6.0.1           py312he70551f_1    conda-forge
pyzmq                     25.1.2          py312h1ac6f91_0    conda-forge
referencing               0.32.0             pyhd8ed1ab_0    conda-forge
requests                  2.31.0             pyhd8ed1ab_0    conda-forge
rfc3339-validator         0.1.4              pyhd8ed1ab_0    conda-forge
rfc3986-validator         0.1.1              pyh9f0ad1d_0    conda-forge
rpds-py                   0.13.2          py312hfccd98a_0    conda-forge
send2trash                1.8.2              pyh08f2357_0    conda-forge
setuptools                68.2.2             pyhd8ed1ab_0    conda-forge
six                       1.16.0             pyh6c4a22f_0    conda-forge
sniffio                   1.3.0              pyhd8ed1ab_0    conda-forge
soupsieve                 2.5                pyhd8ed1ab_1    conda-forge
stack_data                0.6.2              pyhd8ed1ab_0    conda-forge
terminado                 0.18.0             pyh5737063_0    conda-forge
tinycss2                  1.2.1              pyhd8ed1ab_0    conda-forge
tk                        8.6.13               h5226925_1    conda-forge
tomli                     2.0.1              pyhd8ed1ab_0    conda-forge
tornado                   6.3.3           py312he70551f_1    conda-forge
traitlets                 5.14.0             pyhd8ed1ab_0    conda-forge
types-python-dateutil     2.8.19.14          pyhd8ed1ab_0    conda-forge
typing-extensions         4.9.0                hd8ed1ab_0    conda-forge
typing_extensions         4.9.0              pyha770c72_0    conda-forge
typing_utils              0.1.0              pyhd8ed1ab_0    conda-forge
tzdata                    2023c                h71feb2d_0    conda-forge
ucrt                      10.0.22621.0         h57928b3_0    conda-forge
uri-template              1.3.0              pyhd8ed1ab_0    conda-forge
urllib3                   2.1.0              pyhd8ed1ab_0    conda-forge
vc                        14.3                hcf57466_18    conda-forge
vc14_runtime              14.38.33130         h82b7239_18    conda-forge
vs2015_runtime            14.38.33130         hcb4865c_18    conda-forge
wcwidth                   0.2.12             pyhd8ed1ab_0    conda-forge
webcolors                 1.13               pyhd8ed1ab_0    conda-forge
webencodings              0.5.1              pyhd8ed1ab_2    conda-forge
websocket-client          1.7.0              pyhd8ed1ab_0    conda-forge
wheel                     0.42.0             pyhd8ed1ab_0    conda-forge
win_inet_pton             1.1.0              pyhd8ed1ab_6    conda-forge
winpty                    0.4.3                         4    conda-forge
xz                        5.2.6                h8d14728_0    conda-forge
yaml                      0.2.5                h8ffe710_2    conda-forge
zeromq                    4.3.5                h63175ca_0    conda-forge
zipp                      3.17.0             pyhd8ed1ab_0    conda-forge

$ pip list
Package                   Version
------------------------- ------------
anyio                     4.1.0
argon2-cffi               23.1.0
argon2-cffi-bindings      21.2.0
arrow                     1.3.0
asttokens                 2.4.1
async-lru                 2.0.4
attrs                     23.1.0
Babel                     2.14.0
beautifulsoup4            4.12.2
bleach                    6.1.0
Brotli                    1.1.0
cached-property           1.5.2
certifi                   2023.11.17
cffi                      1.16.0
charset-normalizer        3.3.2
colorama                  0.4.6
comm                      0.1.4
debugpy                   1.8.0
decorator                 5.1.1
defusedxml                0.7.1
docutils                  0.20.1
entrypoints               0.4
exceptiongroup            1.2.0
executing                 2.0.1
fastjsonschema            2.19.0
fqdn                      1.5.1
html5lib                  1.1
idna                      3.6
importlib-metadata        7.0.0
importlib-resources       6.1.1
iniconfig                 2.0.0
ipykernel                 6.26.0
ipython                   8.18.1
isoduration               20.11.0
jedi                      0.19.1
Jinja2                    3.1.2
json5                     0.9.14
jsonpointer               2.4
jsonschema                4.20.0
jsonschema-specifications 2023.11.2
jupyter_client            8.6.0
jupyter_core              5.5.0
jupyter-events            0.9.0
jupyter-lsp               2.2.1
jupyter_server            2.12.1
jupyter_server_terminals  0.5.0
jupyterlab                4.0.9
jupyterlab_pygments       0.3.0
jupyterlab_server         2.25.2
MarkupSafe                2.1.3
matplotlib-inline         0.1.6
mistune                   3.0.2
nbclient                  0.8.0
nbconvert                 7.12.0
nbformat                  5.9.2
nest-asyncio              1.5.8
notebook_shim             0.2.3
overrides                 7.4.0
packaging                 23.2
pandocfilters             1.5.0
parso                     0.8.3
pickleshare               0.7.5
pip                       23.3.1
pkgutil_resolve_name      1.3.10
platformdirs              4.1.0
pluggy                    1.3.0
prometheus-client         0.19.0
prompt-toolkit            3.0.42
psutil                    5.9.5
pure-eval                 0.2.2
pycparser                 2.21
Pygments                  2.17.2
PySocks                   1.7.1
pytest                    7.4.3
pytest-jupyter            0.8.0
python-dateutil           2.8.2
python-json-logger        2.0.7
pytz                      2023.3.post1
pywin32                   306
pywinpty                  2.0.12
PyYAML                    6.0.1
pyzmq                     25.1.2
referencing               0.32.0
requests                  2.31.0
rfc3339-validator         0.1.4
rfc3986-validator         0.1.1
rpds-py                   0.13.2
Send2Trash                1.8.2
setuptools                68.2.2
six                       1.16.0
sniffio                   1.3.0
soupsieve                 2.5
stack-data                0.6.2
terminado                 0.18.0
tinycss2                  1.2.1
tomli                     2.0.1
tornado                   6.3.3
traitlets                 5.14.0
types-python-dateutil     2.8.19.14
typing_extensions         4.9.0
typing-utils              0.1.0
uri-template              1.3.0
urllib3                   2.1.0
wcwidth                   0.2.12
webcolors                 1.13
webencodings              0.5.1
websocket-client          1.7.0
wheel                     0.42.0
win-inet-pton             1.1.0
zipp                      3.17.0
    

I tried it, nothing is wrong. The details is below.

Details

$ pip check  
No broken requirements found.

conda doctor
Environment Health Report for: E:\Software\Anaconda\envs\jupyterlab-extension-examples

1. Missing Files:

✅ There are no packages with missing files.

2. Altered Files:

✅ There are no packages with altered files.

3. Environment listed in environments.txt file: ✅

Then, I run jlpm install:extension and follow the prompts to run yarn install, the details are below.

Details

$ jlpm install:extension
Internal Error: @jupyterlab-examples/all@workspace:.: This package doesn't seem to be present in your lockfile; run "yarn install" to update the lockfile
    at q0.getCandidates (E:\Software\Anaconda\envs\jupyterlab-extension-examples\Lib\site-packages\jupyterlab\staging\yarn.js:435:5145)
    at xf.getCandidates (E:\Software\Anaconda\envs\jupyterlab-extension-examples\Lib\site-packages\jupyterlab\staging\yarn.js:391:1264)
    at E:\Software\Anaconda\envs\jupyterlab-extension-examples\Lib\site-packages\jupyterlab\staging\yarn.js:439:7693
    at ff (E:\Software\Anaconda\envs\jupyterlab-extension-examples\Lib\site-packages\jupyterlab\staging\yarn.js:390:11070)
    at ge (E:\Software\Anaconda\envs\jupyterlab-extension-examples\Lib\site-packages\jupyterlab\staging\yarn.js:439:7673)
    at async Promise.allSettled (index 0)
    at async to (E:\Software\Anaconda\envs\jupyterlab-extension-examples\Lib\site-packages\jupyterlab\staging\yarn.js:390:10398)     
    at async E:\Software\Anaconda\envs\jupyterlab-extension-examples\Lib\site-packages\jupyterlab\staging\yarn.js:439:8205
    at async ti.startProgressPromise (E:\Software\Anaconda\envs\jupyterlab-extension-examples\Lib\site-packages\jupyterlab\staging\yarn.js:390:47579)
    at async je.resolveEverything (E:\Software\Anaconda\envs\jupyterlab-extension-examples\Lib\site-packages\jupyterlab\staging\yarn.js:439:6233)


$ yarn install
yarn install v1.22.19
info No lockfile found.
[1/4] Resolving packages...
warning lerna > @npmcli/run-script > node-gyp > make-fetch-happen > cacache > @npmcli/move-file@2.0.1: This functionality has been moved to @npmcli/fs
warning workspace-aggregator-2e3798de-99fb-4c95-aa80-150698ca2ec2 > @jupyterlab-examples/clap-button > source-map-loader > abab@2.0.6: Use your platform's native atob() and btoa() methods instead
warning workspace-aggregator-2e3798de-99fb-4c95-aa80-150698ca2ec2 > @jupyterlab-examples/clap-button > @jupyterlab/builder > source-map-loader > data-urls > abab@2.0.6: Use your platform's native atob() and btoa() methods instead
warning workspace-aggregator-2e3798de-99fb-4c95-aa80-150698ca2ec2 > @jupyterlab-examples/codemirror-extension > @jupyterlab/testutils > @jupyterlab/testing > jest-environment-jsdom > jsdom > abab@2.0.6: Use your platform's native atob() and btoa() methods instead   
warning workspace-aggregator-2e3798de-99fb-4c95-aa80-150698ca2ec2 > @jupyterlab-examples/codemirror-extension > @jupyterlab/testutils > @jupyterlab/testing > jest-environment-jsdom > jsdom > data-urls > abab@2.0.6: Use your platform's native atob() and btoa() methods instead
warning workspace-aggregator-2e3798de-99fb-4c95-aa80-150698ca2ec2 > @jupyterlab-examples/codemirror-extension > @jupyterlab/testutils > @jupyterlab/testing > jest-environment-jsdom > jsdom > domexception@4.0.0: Use your platform's native DOMException instead        
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning "workspace-aggregator-2e3798de-99fb-4c95-aa80-150698ca2ec2 > @jupyterlab-examples/clap-button > source-map-loader@1.1.3" has 
unmet peer dependency "webpack@^4.0.0 || ^5.0.0".
warning "workspace-aggregator-2e3798de-99fb-4c95-aa80-150698ca2ec2 > @jupyterlab-examples/clap-button > style-loader@3.3.3" has unmet peer dependency "webpack@^5.0.0".
warning "workspace-aggregator-2e3798de-99fb-4c95-aa80-150698ca2ec2 > @jupyterlab-examples/clap-button > css-loader@6.8.1" has unmet peer dependency "webpack@^5.0.0".
warning "workspace-aggregator-2e3798de-99fb-4c95-aa80-150698ca2ec2 > @jupyterlab-examples/completer > @jupyterlab/settingregistry@4.0.9" has unmet peer dependency "react@>=16".
warning "workspace-aggregator-2e3798de-99fb-4c95-aa80-150698ca2ec2 > @jupyterlab-examples/custom-log-console > @jupyterlab/ui-components@4.0.9" has unmet peer dependency "react@^18.2.0".
[4/4] Building fresh packages...
success Saved lockfile.
Done in 222.21s.

And when I execute jlpm install:extension again, I meet below:

Details

$ jlpm install:extension
Internal Error: @jupyterlab-examples/all@workspace:.: This package doesn't seem to be present in your lockfile; run "yarn install" to update the lockfile
    at q0.getCandidates (E:\Software\Anaconda\envs\jupyterlab-extension-examples\Lib\site-packages\jupyterlab\staging\yarn.js:435:5145)
    at xf.getCandidates (E:\Software\Anaconda\envs\jupyterlab-extension-examples\Lib\site-packages\jupyterlab\staging\yarn.js:391:1264)
    at E:\Software\Anaconda\envs\jupyterlab-extension-examples\Lib\site-packages\jupyterlab\staging\yarn.js:439:7693
    at ff (E:\Software\Anaconda\envs\jupyterlab-extension-examples\Lib\site-packages\jupyterlab\staging\yarn.js:390:11070)
    at ge (E:\Software\Anaconda\envs\jupyterlab-extension-examples\Lib\site-packages\jupyterlab\staging\yarn.js:439:7673)
    at async Promise.allSettled (index 0)
    at async to (E:\Software\Anaconda\envs\jupyterlab-extension-examples\Lib\site-packages\jupyterlab\staging\yarn.js:390:10398)     
    at async E:\Software\Anaconda\envs\jupyterlab-extension-examples\Lib\site-packages\jupyterlab\staging\yarn.js:439:8205
    at async ti.startProgressPromise (E:\Software\Anaconda\envs\jupyterlab-extension-examples\Lib\site-packages\jupyterlab\staging\yarn.js:390:47579)
    at async je.resolveEverything (E:\Software\Anaconda\envs\jupyterlab-extension-examples\Lib\site-packages\jupyterlab\staging\yarn.js:439:6233)

krassowski commented 9 months ago

Thanks @GuYith, this is something we can work with.

$ jlpm install:extension
Internal Error: @jupyterlab-examples/all@workspace:.: This package doesn't seem to be present in your lockfile; run "yarn install" to update the lockfile

I can reproduce this message when I run from the root instead from the individual example folder. If you did that from the root, can you try cd hello-world and then jlpm install:extension?

GuYith commented 9 months ago

Thanks @GuYith, this is something we can work with.

$ jlpm install:extension
Internal Error: @jupyterlab-examples/all@workspace:.: This package doesn't seem to be present in your lockfile; run "yarn install" to update the lockfile

I can reproduce this message when I run from the root instead from the individual example folder. If you did that from the root, can you try cd hello-world and then jlpm install:extension?

image

Thank you for your quick reply! I know what you mean, actually I run the command from dir extension-examples\hello-world, I found the yarn.lock file was generated under the dir extension-examples (so strange, but happended) , so I move it to extension-examples\hello-world and rerun. image

but the error still appears. image

krassowski commented 9 months ago

Can you try to:

GuYith commented 9 months ago

Can you try to:你能试着

  • remove extension-examples\yarn.lock (if still there)删除 extension-examples\yarn.lock (如果仍然存在)
  • remove extension-examples\hello-word\yarn.lock 删除 extension-examples\hello-word\yarn.lock
  • enter into extension-examples\hello-word directory and run jlpm install and then jlpm install:extension进入 extension-examples\hello-word 目录,运行 jlpm install 然后运行 jlpm install:extension

Yes, I tried it. As I said earlier, yarn.lock is still generated in dir extension-examples.

After delete, the dir list ![image](https://github.com/jupyterlab/extension-examples/assets/48597370/d8ba7ae3-e768-4aaa-a094-3b9e5d35d217) ![image](https://github.com/jupyterlab/extension-examples/assets/48597370/130fb0df-b43b-483f-a6b7-6570ac919df5)
jlpm install details

jupyterlab-extension-examples) PS D:\A_Code_Exercise\jupyterext_test\extension-examples\hello-world> jlpm install
➤ YN0000: ┌ Resolution step
➤ YN0061: │ abab@npm:2.0.6 is deprecated: Use your platform's native atob() and btoa() methods instead
➤ YN0032: │ fsevents@npm:2.3.3: Implicit dependencies on node-gyp are discouraged
➤ YN0061: │ @npmcli/move-file@npm:2.0.1 is deprecated: This functionality has been moved to @npmcli/fs
➤ YN0032: │ @parcel/watcher@npm:2.0.4: Implicit dependencies on node-gyp are discouraged
➤ YN0061: │ domexception@npm:4.0.0 is deprecated: Use your platform's native DOMException instead
➤ YN0032: │ node-addon-api@npm:3.2.1: Implicit dependencies on node-gyp are discouraged
➤ YN0032: │ leveldown@npm:5.6.0: Implicit dependencies on node-gyp are discouraged
➤ YN0002: │ @jupyterlab-examples/clap-button@workspace:clap-button-message doesn't provide webpack (pc666a), requested by css-loader
➤ YN0002: │ @jupyterlab-examples/clap-button@workspace:clap-button-message doesn't provide webpack (p6e9f5), requested by source-map-loader
➤ YN0002: │ @jupyterlab-examples/clap-button@workspace:clap-button-message doesn't provide webpack (p11c5a), requested by style-loader
➤ YN0002: │ @jupyterlab-examples/codemirror-extension@workspace:codemirror-extension doesn't provide webpack (p8f999), requested by css-loader
➤ YN0002: │ @jupyterlab-examples/codemirror-extension@workspace:codemirror-extension doesn't provide webpack (p24a2c), requested by source-map-loader
➤ YN0002: │ @jupyterlab-examples/codemirror-extension@workspace:codemirror-extension doesn't provide webpack (p69529), requested by style-loader
➤ YN0002: │ @jupyterlab-examples/command-palette@workspace:command-palette doesn't provide webpack (pb887c), requested by css-loader
➤ YN0002: │ @jupyterlab-examples/command-palette@workspace:command-palette doesn't provide webpack (pdf8b8), requested by source-map-loader
➤ YN0002: │ @jupyterlab-examples/command-palette@workspace:command-palette doesn't provide webpack (p060f6), requested by style-loader
➤ YN0002: │ @jupyterlab-examples/commands@workspace:commands doesn't provide webpack (pc3581), requested by css-loader
➤ YN0002: │ @jupyterlab-examples/commands@workspace:commands doesn't provide webpack (p4994c), requested by source-map-loader
➤ YN0002: │ @jupyterlab-examples/commands@workspace:commands doesn't provide webpack (pb16df), requested by style-loader
➤ YN0002: │ @jupyterlab-examples/completer@workspace:completer doesn't provide react (p8fa3b), requested by @jupyterlab/settingregistry
➤ YN0002: │ @jupyterlab-examples/completer@workspace:completer doesn't provide webpack (pb6aef), requested by css-loader
➤ YN0002: │ @jupyterlab-examples/completer@workspace:completer doesn't provide webpack (p4b27e), requested by source-map-loader
➤ YN0002: │ @jupyterlab-examples/completer@workspace:completer doesn't provide webpack (p94843), requested by style-loader
➤ YN0002: │ @jupyterlab-examples/contentheader@workspace:contentheader doesn't provide webpack (p3dd2e), requested by css-loader
➤ YN0002: │ @jupyterlab-examples/contentheader@workspace:contentheader doesn't provide webpack (p94447), requested by source-map-loader
➤ YN0002: │ @jupyterlab-examples/contentheader@workspace:contentheader doesn't provide webpack (p30eae), requested by style-loader
➤ YN0002: │ @jupyterlab-examples/context-menu@workspace:context-menu doesn't provide react (p1ce2e), requested by @jupyterlab/settingregistry
➤ YN0002: │ @jupyterlab-examples/context-menu@workspace:context-menu doesn't provide webpack (p001bb), requested by css-loader
➤ YN0002: │ @jupyterlab-examples/context-menu@workspace:context-menu doesn't provide webpack (pad855), requested by source-map-loader
➤ YN0002: │ @jupyterlab-examples/context-menu@workspace:context-menu doesn't provide webpack (pbee9d), requested by style-loader
➤ YN0002: │ @jupyterlab-examples/custom-log-console@workspace:custom-log-console doesn't provide react (p5ae3e), requested by @jupyterlab/settingregistry        
➤ YN0002: │ @jupyterlab-examples/custom-log-console@workspace:custom-log-console doesn't provide webpack (p66b57), requested by css-loader
➤ YN0002: │ @jupyterlab-examples/custom-log-console@workspace:custom-log-console doesn't provide webpack (p167c2), requested by source-map-loader
➤ YN0002: │ @jupyterlab-examples/custom-log-console@workspace:custom-log-console doesn't provide webpack (p5b1cc), requested by style-loader
➤ YN0002: │ @jupyterlab-examples/datagrid@workspace:datagrid doesn't provide react (pae891), requested by @jupyterlab/settingregistry
➤ YN0002: │ @jupyterlab-examples/datagrid@workspace:datagrid doesn't provide webpack (pfc27b), requested by css-loader
➤ YN0002: │ @jupyterlab-examples/datagrid@workspace:datagrid doesn't provide webpack (pc51f3), requested by source-map-loader
➤ YN0002: │ @jupyterlab-examples/datagrid@workspace:datagrid doesn't provide webpack (p50e4d), requested by style-loader
➤ YN0002: │ @jupyterlab-examples/documents@workspace:documents doesn't provide webpack (p932cb), requested by css-loader
➤ YN0002: │ @jupyterlab-examples/documents@workspace:documents doesn't provide webpack (pbd017), requested by source-map-loader
➤ YN0002: │ @jupyterlab-examples/documents@workspace:documents doesn't provide webpack (pc7aae), requested by style-loader
➤ YN0002: │ @jupyterlab-examples/hello-world@workspace:hello-world doesn't provide webpack (pf6a6b), requested by css-loader
➤ YN0002: │ @jupyterlab-examples/hello-world@workspace:hello-world doesn't provide webpack (p959a7), requested by source-map-loader
➤ YN0002: │ @jupyterlab-examples/hello-world@workspace:hello-world doesn't provide webpack (p134b8), requested by style-loader
➤ YN0002: │ @jupyterlab-examples/kernel-messaging@workspace:kernel-messaging doesn't provide webpack (p388fd), requested by css-loader
➤ YN0002: │ @jupyterlab-examples/kernel-messaging@workspace:kernel-messaging doesn't provide webpack (p9bdd0), requested by source-map-loader
➤ YN0002: │ @jupyterlab-examples/kernel-messaging@workspace:kernel-messaging doesn't provide webpack (pb2caf), requested by style-loader
➤ YN0002: │ @jupyterlab-examples/kernel-output@workspace:kernel-output doesn't provide react (pdedc6), requested by @jupyterlab/settingregistry
➤ YN0002: │ @jupyterlab-examples/kernel-output@workspace:kernel-output doesn't provide webpack (p17e60), requested by css-loader
➤ YN0002: │ @jupyterlab-examples/kernel-output@workspace:kernel-output doesn't provide webpack (pdea44), requested by source-map-loader
➤ YN0002: │ @jupyterlab-examples/kernel-output@workspace:kernel-output doesn't provide webpack (pc89ba), requested by style-loader
➤ YN0002: │ @jupyterlab-examples/launcher@workspace:launcher doesn't provide react (p4e048), requested by @jupyterlab/settingregistry
➤ YN0002: │ @jupyterlab-examples/launcher@workspace:launcher doesn't provide webpack (pa217c), requested by css-loader
➤ YN0002: │ @jupyterlab-examples/launcher@workspace:launcher doesn't provide webpack (p0b976), requested by source-map-loader
➤ YN0002: │ @jupyterlab-examples/launcher@workspace:launcher doesn't provide webpack (pf9182), requested by style-loader
➤ YN0002: │ @jupyterlab-examples/log-messages@workspace:log-messages doesn't provide react (p31e5e), requested by @jupyterlab/settingregistry
➤ YN0002: │ @jupyterlab-examples/log-messages@workspace:log-messages doesn't provide webpack (p719ff), requested by css-loader
➤ YN0002: │ @jupyterlab-examples/log-messages@workspace:log-messages doesn't provide webpack (p3334c), requested by source-map-loader
➤ YN0002: │ @jupyterlab-examples/log-messages@workspace:log-messages doesn't provide webpack (p90d50), requested by style-loader
➤ YN0002: │ @jupyterlab-examples/main-menu@workspace:main-menu doesn't provide react (pdfaa7), requested by @jupyterlab/settingregistry
➤ YN0002: │ @jupyterlab-examples/main-menu@workspace:main-menu doesn't provide webpack (p8c588), requested by css-loader
➤ YN0002: │ @jupyterlab-examples/main-menu@workspace:main-menu doesn't provide webpack (p6e902), requested by source-map-loader
➤ YN0002: │ @jupyterlab-examples/main-menu@workspace:main-menu doesn't provide webpack (pb5938), requested by style-loader
➤ YN0002: │ @jupyterlab-examples/metadata-form@workspace:metadata-form doesn't provide webpack (pda972), requested by css-loader
➤ YN0002: │ @jupyterlab-examples/metadata-form@workspace:metadata-form doesn't provide webpack (pee464), requested by source-map-loader
➤ YN0002: │ @jupyterlab-examples/metadata-form@workspace:metadata-form doesn't provide webpack (p95063), requested by style-loader
➤ YN0002: │ @jupyterlab-examples/notifications@workspace:notifications doesn't provide webpack (p4d0d3), requested by css-loader
➤ YN0002: │ @jupyterlab-examples/notifications@workspace:notifications doesn't provide webpack (p56977), requested by source-map-loader
➤ YN0002: │ @jupyterlab-examples/notifications@workspace:notifications doesn't provide webpack (pde699), requested by style-loader
➤ YN0002: │ @jupyterlab-examples/react-widget@workspace:react-widget doesn't provide webpack (p7abd4), requested by css-loader
➤ YN0002: │ @jupyterlab-examples/react-widget@workspace:react-widget doesn't provide webpack (pae119), requested by source-map-loader
➤ YN0002: │ @jupyterlab-examples/react-widget@workspace:react-widget doesn't provide webpack (pf3ffb), requested by style-loader
➤ YN0002: │ @jupyterlab-examples/server-extension@workspace:server-extension doesn't provide webpack (pad374), requested by css-loader
➤ YN0002: │ @jupyterlab-examples/server-extension@workspace:server-extension doesn't provide webpack (p81b9d), requested by source-map-loader
➤ YN0002: │ @jupyterlab-examples/server-extension@workspace:server-extension doesn't provide webpack (pbdc0c), requested by style-loader
➤ YN0002: │ @jupyterlab-examples/settings@workspace:settings doesn't provide react (pdd81a), requested by @jupyterlab/settingregistry
➤ YN0002: │ @jupyterlab-examples/settings@workspace:settings doesn't provide webpack (p53e3c), requested by css-loader
➤ YN0002: │ @jupyterlab-examples/settings@workspace:settings doesn't provide webpack (p79a43), requested by source-map-loader
➤ YN0002: │ @jupyterlab-examples/settings@workspace:settings doesn't provide webpack (p59a82), requested by style-loader
➤ YN0002: │ @jupyterlab-examples/shout-button@workspace:shout-button-message doesn't provide webpack (p87fd4), requested by css-loader
➤ YN0002: │ @jupyterlab-examples/shout-button@workspace:shout-button-message doesn't provide webpack (p1fd43), requested by source-map-loader
➤ YN0002: │ @jupyterlab-examples/shout-button@workspace:shout-button-message doesn't provide webpack (p11b22), requested by style-loader
➤ YN0002: │ @jupyterlab-examples/signals@workspace:signals doesn't provide react (p4d7c3), requested by @jupyterlab/settingregistry
➤ YN0002: │ @jupyterlab-examples/signals@workspace:signals doesn't provide webpack (p0ae7b), requested by css-loader
➤ YN0002: │ @jupyterlab-examples/signals@workspace:signals doesn't provide webpack (p4300d), requested by source-map-loader
➤ YN0002: │ @jupyterlab-examples/signals@workspace:signals doesn't provide webpack (p6acae), requested by style-loader
➤ YN0002: │ @jupyterlab-examples/state@workspace:state doesn't provide webpack (pe9e3e), requested by css-loader
➤ YN0002: │ @jupyterlab-examples/state@workspace:state doesn't provide webpack (p10468), requested by source-map-loader
➤ YN0002: │ @jupyterlab-examples/state@workspace:state doesn't provide webpack (p1eeaa), requested by style-loader
➤ YN0002: │ @jupyterlab-examples/toolbar-button@workspace:toolbar-button doesn't provide webpack (pcc7eb), requested by css-loader
➤ YN0002: │ @jupyterlab-examples/toolbar-button@workspace:toolbar-button doesn't provide webpack (p10715), requested by source-map-loader
➤ YN0002: │ @jupyterlab-examples/toolbar-button@workspace:toolbar-button doesn't provide webpack (p7557f), requested by style-loader
➤ YN0002: │ @jupyterlab-examples/toparea@workspace:toparea-text-widget doesn't provide webpack (p29aaa), requested by css-loader
➤ YN0002: │ @jupyterlab-examples/toparea@workspace:toparea-text-widget doesn't provide webpack (p0eb92), requested by source-map-loader
➤ YN0002: │ @jupyterlab-examples/toparea@workspace:toparea-text-widget doesn't provide webpack (p503f6), requested by style-loader
➤ YN0002: │ @jupyterlab-examples/widgets@workspace:widgets doesn't provide react (pc6238), requested by @jupyterlab/settingregistry
➤ YN0002: │ @jupyterlab-examples/widgets@workspace:widgets doesn't provide webpack (p55cd4), requested by css-loader
➤ YN0002: │ @jupyterlab-examples/widgets@workspace:widgets doesn't provide webpack (p8f511), requested by source-map-loader
➤ YN0002: │ @jupyterlab-examples/widgets@workspace:widgets doesn't provide webpack (pa3de2), requested by style-loader
➤ YN0002: │ @jupyterlab/metadataform@npm:4.0.9 doesn't provide @rjsf/utils (p451c8), requested by @rjsf/core
➤ YN0002: │ @jupyterlab/metadataform@npm:4.0.9 doesn't provide @rjsf/utils (p80908), requested by @rjsf/validator-ajv8
➤ YN0002: │ @jupyterlab/services@npm:7.0.9 doesn't provide react (p89091), requested by @jupyterlab/settingregistry
➤ YN0002: │ @jupyterlab/testutils@npm:4.0.9 doesn't provide typescript (p6bd8e), requested by @jupyterlab/testing
➤ YN0002: │ @nrwl/devkit@npm:16.10.0 doesn't provide nx (p048f2), requested by @nx/devkit
➤ YN0000: │ Some peer dependencies are incorrectly met; run yarn explain peer-requirements  for details, where  is the six-letter p-prefixed code    
➤ YN0000: └ Completed in 6m 41s
➤ YN0000: ┌ Fetch step
➤ YN0013: │ yargs-parser@npm:21.1.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ yargs@npm:16.2.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ yargs@npm:17.7.2 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ yjs@npm:13.6.10 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ yocto-queue@npm:0.1.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0000: └ Completed in 9s 489ms
➤ YN0000: ┌ Link step
➤ YN0007: │ @parcel/watcher@npm:2.0.4 must be built because it never has been before or the last one failed
➤ YN0007: │ @fortawesome/fontawesome-free@npm:5.15.4 must be built because it never has been before or the last one failed
➤ YN0007: │ leveldown@npm:5.6.0 must be built because it never has been before or the last one failed
➤ YN0007: │ nx@npm:16.10.0 [cc223] must be built because it never has been before or the last one failed
➤ YN0000: └ Completed in 3m 25s
➤ YN0000: Done with warnings in 10m 15s

image

krassowski commented 9 months ago

Ok, so this is all the same as on my side. And then if you run jlpm install:extension from extension-examples\hello-word it still errors out with the same message as before?

GuYith commented 9 months ago

Ok, so this is all the same as on my side. And then if you run jlpm install:extension from extension-examples\hello-word it still errors out with the same message as before?

Thank you very much for your reply! Yes, error is different.


(jupyterlab-extension-examples) PS D:\A_Code_Exercise\jupyterext_test\extension-examples\hello-world> jlpm install:extension
Traceback (most recent call last):
  File "E:\Software\Anaconda\envs\jupyterlab-extension-examples\Scripts\jlpm-script.py", line 9, in 
    sys.exit(main())
             ^^^^^^
  File "E:\Software\Anaconda\envs\jupyterlab-extension-examples\Lib\site-packages\jupyterlab\jlpmapp.py", line 43, in main  
    execvp("node", ["node", YARN_PATH, *argv])
  File "E:\Software\Anaconda\envs\jupyterlab-extension-examples\Lib\site-packages\jupyterlab\jlpmapp.py", line 29, in execvp
    p = subprocess.Popen([cmd] + argv[1:])
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\Software\Anaconda\envs\jupyterlab-extension-examples\Lib\subprocess.py", line 1026, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "E:\Software\Anaconda\envs\jupyterlab-extension-examples\Lib\subprocess.py", line 1538, in _execute_child
    hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
OSError: [WinError 193] %1 不是有效的 Win32 应用程序。
krassowski commented 9 months ago

Ok, so it says OSError: [WinError 193] %1 is not a valid Win32 application. We saw this before I believe, it has something to do with node executable not being picked up correctly on Windows. https://github.com/jupyterlab/jupyterlab/issues/15521

Could you editing the file E:\Software\Anaconda\envs\jupyterlab-extension-examples\Lib\site-packages\jupyterlab\jlpmapp.py" replacing:

    execvp("node", ["node", YARN_PATH, *argv])

with:

    import shutil
    node = shutil.which("node") or shutil.which("nodejs") or shutil.which("nodejs.exe")
    execvp(node, [node, YARN_PATH, *argv])

and try again?

GuYith commented 9 months ago

Ok, so it says OSError: [WinError 193] %1 is not a valid Win32 application. We saw this before I believe, it has something to do with node executable not being picked up correctly on Windows. jupyterlab/jupyterlab#15521

Could you editing the file E:\Software\Anaconda\envs\jupyterlab-extension-examples\Lib\site-packages\jupyterlab\jlpmapp.py" replacing:

    execvp("node", ["node", YARN_PATH, *argv])

with:

    import shutil
    node = shutil.which("node") or shutil.which("nodejs") or shutil.which("nodejs.exe")
    execvp(node, [node, YARN_PATH, *argv])

and try again?

Yes! But I still met error.

Error details

(jupyterlab-extension-examples) PS D:\A_Code_Exercise\jupyterext_test\extension-examples\hello-world> jlpm install:extension
Traceback (most recent call last):
  File "E:\Software\Anaconda\envs\jupyterlab-extension-examples\Scripts\jlpm-script.py", line 9, in 
    sys.exit(main())
             ^^^^^^
  File "E:\Software\Anaconda\envs\jupyterlab-extension-examples\Lib\site-packages\jupyterlab\jlpmapp.py", line 45, in main
    execvp(node, [node, YARN_PATH, *argv])
  File "E:\Software\Anaconda\envs\jupyterlab-extension-examples\Lib\site-packages\jupyterlab\jlpmapp.py", line 30, in execvp
    p = subprocess.Popen([cmd] + argv[1:])
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\Software\Anaconda\envs\jupyterlab-extension-examples\Lib\subprocess.py", line 1026, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "E:\Software\Anaconda\envs\jupyterlab-extension-examples\Lib\subprocess.py", line 1538, in _execute_child
    hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
OSError: [WinError 193] %1 不是有效的 Win32 应用程序。

jlpmapp.py (modifed)


"""A Jupyter-aware wrapper for the yarn package manager"""

import os

# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
import sys
import shutil

from jupyterlab_server.process import subprocess, which

HERE = os.path.dirname(os.path.abspath(__file__))
YARN_PATH = os.path.join(HERE, "staging", "yarn.js")

def execvp(cmd, argv):
    """Execvp, except on Windows where it uses Popen.

    The first argument, by convention, should point to the filename
    associated with the file being executed.

    Python provides execvp on Windows, but its behavior is problematic
    (Python bug#9148).
    """
    cmd = which(cmd)
    if os.name == "nt":
        import signal
        import sys

        p = subprocess.Popen([cmd] + argv[1:])
        # Don't raise KeyboardInterrupt in the parent process.
        # Set this after spawning, to avoid subprocess inheriting handler.
        signal.signal(signal.SIGINT, signal.SIG_IGN)
        p.wait()
        sys.exit(p.returncode)
    else:
        os.execvp(cmd, argv)  # noqa S606

def main(argv=None):
    """Run node and return the result."""
    # Make sure node is available.
    argv = argv or sys.argv[1:]
    node = shutil.which("node") or shutil.which("nodejs") or shutil.which("nodejs.exe")
    execvp(node, [node, YARN_PATH, *argv])
krassowski commented 9 months ago

Hmm. https://github.com/jupyterlab/jupyterlab/issues/15400#issuecomment-1820598136 reported that changing all occurrences of jlpm to npm run in package.json worked. Could you give it a try?

GuYith commented 9 months ago

Ok! It seems to run successfully.

(jupyterlab-extension-examples) PS D:\A_Code_Exercise\jupyterext_test\extension-examples\hello-world> jlpm install:extension

> @jupyterlab-examples/hello-world@0.1.0 build       
> npm run build:lib && npm run build:labextension:dev

> @jupyterlab-examples/hello-world@0.1.0 build:lib
> tsc --sourceMap

> @jupyterlab-examples/hello-world@0.1.0 build:labextension:dev
> jupyter labextension build --development True .

Fail to get yarn configuration. [WinError 193] %1 不是有效的 Win32 应用程序。
Fail to get yarn configuration. [WinError 193] %1 不是有效的 Win32 应用程序。
Building extension in .

Compilation starting…

Compilation finished

asset style_index_js.67c074b28c240e132ca3.js 19 KiB [emitted] [immutable] 1 related asset
asset remoteEntry.bf08cc7a6da365cafc5a.js 16.4 KiB [emitted] [immutable] (name: @jupyterlab-examples/hello-world) 1 related asset
asset lib_index_js.8b36e384112063946136.js 1020 bytes [emitted] [immutable] 1 related asset
runtime modules 9.23 KiB 13 modules
built modules 10.9 KiB (javascript) 42 bytes (share-init) [built]
  cacheable modules 10.9 KiB
    modules by path ../node_modules/ 8.58 KiB
      modules by path ../node_modules/style-loader/dist/runtime/*.js 5.84 KiB 6 modules
      modules by path ../node_modules/css-loader/dist/runtime/*.js 2.74 KiB
        ../node_modules/css-loader/dist/runtime/sourceMaps.js 505 bytes [built] [code generated]
        ../node_modules/css-loader/dist/runtime/api.js 2.25 KiB [built] [code generated]
    modules by path ./ 2.32 KiB
      modules by path ./style/*.css 1.96 KiB 2 modules
      ./lib/index.js 341 bytes [built] [code generated]
      ./style/index.js 22 bytes [built] [code generated]
  container entry 42 bytes [built] [code generated]
  provide shared module (default) @jupyterlab-examples/hello-world@0.1.0 = ...(truncated) 42 bytes [built] [code generated]
webpack 5.89.0 compiled successfully in 1999 ms

Thank you so so much!

MFA-X-AI commented 9 months ago

Ok! It seems to run successfully.

Great to see it resolved. Was this run on py312?

krassowski commented 9 months ago

Was this run on py312?

Yes, as per conda list:

python                    3.12.0          h2628c8c_0_cpython    conda-forge