-
-
Notifications
You must be signed in to change notification settings - Fork 311
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Following extension tutorial instructions, when run "pip install -ve ." encounter prepare_metadata_for_build_editable issue #757
Comments
Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗 |
I have tried:
Greatly appreciate the community's feedback asap! |
Are you trying to follow Ignore |
I am behind a proxy server: ❯ env | grep proxy As mentioned just followed the tutorial on https://jupyterlab.readthedocs.io/en/stable/extension/extension_tutorial.html |
@krassowski I think it's a problem with (this is windows with minicoda, and export proxy vars with While running this command:
feels like something is not respecting the proxy env vars. Could be Yarn (the internet says that it doesn't like proxy via env, and needs proxy via settings). Workaround: switch out of the VPN/Network environment that requires using a web proxy :) |
Description
Following the instructions in this page: https://jupyterlab.readthedocs.io/en/latest/extension/extension_tutorial.html#extension-tutorial, when as instructed I run the command: pip install -ve . in my_first_extension directory, I will get:
INFO:hatch_jupyter_builder.utils:> /tmp/pip-build-env-pcnfq6v7/overlay/bin/jlpm install
➤ YN0000: ┌ Resolution step
➤ YN0001: │ RequestError
at ClientRequest. (/tmp/pip-build-env-pcnfq6v7/overlay/lib/python3.12/site-packages/jupyterlab/staging/yarn.js:195:14340)
at Object.onceWrapper (node:events:633:26)
at ClientRequest.emit (node:events:530:35)
at o.emit (/tmp/pip-build-env-pcnfq6v7/overlay/lib/python3.12/site-packages/jupyterlab/staging/yarn.js:190:90286)
at TLSSocket.socketErrorListener (node:_http_client:500:9)
at TLSSocket.emit (node:events:518:28)
at emitErrorNT (node:internal/streams/destroy:169:8)
at emitErrorCloseNT (node:internal/streams/destroy:128:3)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21)AggregateError [ETIMEDOUT]:
at internalConnectMultiple (node:net:1116:18)
at internalConnectMultiple (node:net:1184:5)
at Timeout.internalConnectMultipleTimeout (node:net:1710:5)
at listOnTimeout (node:internal/timers:575:11)
at process.processTimers (node:internal/timers:514:7)
➤ YN0000: └ Completed in 19s 452ms
➤ YN0000: Failed with errors in 19s 455ms
Traceback (most recent call last):
File "/home/ss/miniconda3/envs/jupyterlab-ext/lib/python3.12/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 "/home/ss/miniconda3/envs/jupyterlab-ext/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in
main()
File "/home/ss/miniconda3/envs/jupyterlab-ext/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ss/miniconda3/envs/jupyterlab-ext/lib/python3.12/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 "/tmp/pip-build-env-pcnfq6v7/overlay/lib/python3.12/site-packages/hatchling/build.py", line 83, in build_editable
return os.path.basename(next(builder.build(directory=wheel_directory, versions=['editable'])))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/pip-build-env-pcnfq6v7/overlay/lib/python3.12/site-packages/hatchling/builders/plugin/interface.py", line 147, in build
build_hook.initialize(version, build_data)
File "/tmp/pip-build-env-pcnfq6v7/normal/lib/python3.12/site-packages/hatch_jupyter_builder/plugin.py", line 94, in initialize
raise e
File "/tmp/pip-build-env-pcnfq6v7/normal/lib/python3.12/site-packages/hatch_jupyter_builder/plugin.py", line 89, in initialize
build_func(self.target_name, version, **build_kwargs)
File "/tmp/pip-build-env-pcnfq6v7/normal/lib/python3.12/site-packages/hatch_jupyter_builder/utils.py", line 115, in npm_builder
run([*npm_cmd, "install"], cwd=str(abs_path))
File "/tmp/pip-build-env-pcnfq6v7/normal/lib/python3.12/site-packages/hatch_jupyter_builder/utils.py", line 231, in run
return subprocess.check_call(cmd, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ss/miniconda3/envs/jupyterlab-ext/lib/python3.12/subprocess.py", line 413, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/tmp/pip-build-env-pcnfq6v7/overlay/bin/jlpm', 'install']' returned non-zero exit status 1.
error: subprocess-exited-with-error
× Preparing editable metadata (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
full command: /home/ss/miniconda3/envs/jupyterlab-ext/bin/python3.12 /home/ss/miniconda3/envs/jupyterlab-ext/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py prepare_metadata_for_build_editable /tmp/tmpg8hk813b
cwd: /home/ss/my_first_extension
Preparing editable metadata (pyproject.toml) ... error
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.
Reproduce
Follow the instructions in the Extension Tutorial until you get to:
pip install -ve .
Expected behavior
I should be able to follow the instructions easily
Context
The text was updated successfully, but these errors were encountered: