I am finding a difficulty in the following extension tutorial for jupyter labs.
While building the tutorial using
pip install -ve
I have the following error
run(npm_cmd + ["run", build_cmd], cwd=str(abs_path))
File "/tmp/pip-build-env-4een4_o_/normal/lib/python3.10/site-packages/hatch_jupyter_builder/utils.py", line 225, in run
return subprocess.check_call(cmd, **kwargs)
File "/home/savakar/miniconda3/envs/jupyterlab-ext/lib/python3.10/subprocess.py", line 369, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/tmp/pip-build-env-4een4_o_/overlay/bin/jlpm', 'run', 'install:extension']' 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/savakar/miniconda3/envs/jupyterlab-ext/bin/python3.10 /home/savakar/miniconda3/envs/jupyterlab-ext/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py prepare_metadata_for_build_editable /tmp/tmpnb1xd5vq
cwd: /home/savakar/Documents/PROJECTS/JupyterLabExtension/stockWhiz01
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.
The entire error file is also attached here:
pip install -ve .
Using pip 22.2.2 from /home/savakar/miniconda3/envs/jupyterlab-ext/lib/python3.10/site-packages/pip (python 3.10)
Obtaining file:///home/savakar/Documents/PROJECTS/JupyterLabExtension/stockWhiz01
Running command pip subprocess to install build dependencies
Collecting hatchling>=1.3.1
Using cached hatchling-1.11.0-py3-none-any.whl (73 kB)
Collecting jupyterlab<4.0.0,>=3.4.7
Using cached jupyterlab-3.4.8-py3-none-any.whl (8.8 MB)
Collecting hatch-nodejs-version
Using cached hatch_nodejs_version-0.3.0-py3-none-any.whl (8.3 kB)
Collecting editables>=0.3
Using cached editables-0.3-py3-none-any.whl (4.7 kB)
Collecting packaging>=21.3
Using cached packaging-21.3-py3-none-any.whl (40 kB)
Collecting pathspec>=0.10.1
Using cached pathspec-0.10.1-py3-none-any.whl (27 kB)
Collecting tomli>=1.2.2
Using cached tomli-2.0.1-py3-none-any.whl (12 kB)
Collecting pluggy>=1.0.0
Using cached pluggy-1.0.0-py2.py3-none-any.whl (13 kB)
Collecting jupyter-server~=1.16
Using cached jupyter_server-1.19.1-py3-none-any.whl (346 kB)
Collecting jupyter-core
Using cached jupyter_core-4.11.1-py3-none-any.whl (88 kB)
Collecting ipython
Using cached ipython-8.5.0-py3-none-any.whl (752 kB)
Collecting jupyterlab-server~=2.10
Using cached jupyterlab_server-2.15.2-py3-none-any.whl (54 kB)
Collecting notebook<7
Using cached notebook-6.4.12-py3-none-any.whl (9.9 MB)
Collecting jinja2>=2.1
Using cached Jinja2-3.1.2-py3-none-any.whl (133 kB)
Collecting nbclassic
Using cached nbclassic-0.4.5-py3-none-any.whl (9.8 MB)
Collecting tornado>=6.1.0
Using cached tornado-6.2-cp37-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (423 kB)
Collecting MarkupSafe>=2.0
Using cached MarkupSafe-2.1.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (25 kB)
Collecting Send2Trash
Using cached Send2Trash-1.8.0-py3-none-any.whl (18 kB)
Collecting anyio<4,>=3.1.0
Using cached anyio-3.6.1-py3-none-any.whl (80 kB)
Collecting nbconvert>=6.4.4
Using cached nbconvert-7.2.1-py3-none-any.whl (271 kB)
Collecting prometheus-client
Using cached prometheus_client-0.14.1-py3-none-any.whl (59 kB)
Collecting pyzmq>=17
Using cached pyzmq-24.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB)
Collecting traitlets>=5.1
Using cached traitlets-5.4.0-py3-none-any.whl (107 kB)
Collecting terminado>=0.8.3
Using cached terminado-0.16.0-py3-none-any.whl (16 kB)
Collecting argon2-cffi
Using cached argon2_cffi-21.3.0-py3-none-any.whl (14 kB)
Collecting jupyter-client>=6.1.12
Using cached jupyter_client-7.3.5-py3-none-any.whl (132 kB)
Collecting nbformat>=5.2.0
Using cached nbformat-5.7.0-py3-none-any.whl (77 kB)
Collecting websocket-client
Using cached websocket_client-1.4.1-py3-none-any.whl (55 kB)
Collecting babel
Using cached Babel-2.10.3-py3-none-any.whl (9.5 MB)
Collecting jsonschema>=3.0.1
Using cached jsonschema-4.16.0-py3-none-any.whl (83 kB)
Collecting requests
Using cached requests-2.28.1-py3-none-any.whl (62 kB)
Collecting json5
Using cached json5-0.9.10-py2.py3-none-any.whl (19 kB)
Collecting nest-asyncio>=1.5
Using cached nest_asyncio-1.5.6-py3-none-any.whl (5.2 kB)
Collecting ipython-genutils
Using cached ipython_genutils-0.2.0-py2.py3-none-any.whl (26 kB)
Collecting ipykernel
Using cached ipykernel-6.16.0-py3-none-any.whl (138 kB)
Collecting pyparsing!=3.0.5,>=2.0.2
Using cached pyparsing-3.0.9-py3-none-any.whl (98 kB)
Collecting backcall
Using cached backcall-0.2.0-py2.py3-none-any.whl (11 kB)
Collecting pexpect>4.3
Using cached pexpect-4.8.0-py2.py3-none-any.whl (59 kB)
Collecting stack-data
Using cached stack_data-0.5.1-py3-none-any.whl (24 kB)
Collecting pickleshare
Using cached pickleshare-0.7.5-py2.py3-none-any.whl (6.9 kB)
Collecting decorator
Using cached decorator-5.1.1-py3-none-any.whl (9.1 kB)
Collecting matplotlib-inline
Using cached matplotlib_inline-0.1.6-py3-none-any.whl (9.4 kB)
Collecting prompt-toolkit<3.1.0,>3.0.1
Using cached prompt_toolkit-3.0.31-py3-none-any.whl (382 kB)
Collecting pygments>=2.4.0
Using cached Pygments-2.13.0-py3-none-any.whl (1.1 MB)
Collecting jedi>=0.16
Using cached jedi-0.18.1-py2.py3-none-any.whl (1.6 MB)
Collecting notebook-shim>=0.1.0
Using cached notebook_shim-0.1.0-py3-none-any.whl (13 kB)
Collecting sniffio>=1.1
Using cached sniffio-1.3.0-py3-none-any.whl (10 kB)
Collecting idna>=2.8
Using cached idna-3.4-py3-none-any.whl (61 kB)
Collecting parso<0.9.0,>=0.8.0
Using cached parso-0.8.3-py2.py3-none-any.whl (100 kB)
Collecting attrs>=17.4.0
Using cached attrs-22.1.0-py2.py3-none-any.whl (58 kB)
Collecting pyrsistent!=0.17.0,!=0.17.1,!=0.17.2,>=0.14.0
Using cached pyrsistent-0.18.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (115 kB)
Collecting python-dateutil>=2.8.2
Using cached python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
Collecting entrypoints
Using cached entrypoints-0.4-py3-none-any.whl (5.3 kB)
Collecting tinycss2
Using cached tinycss2-1.1.1-py3-none-any.whl (21 kB)
Collecting nbclient>=0.5.0
Using cached nbclient-0.7.0-py3-none-any.whl (71 kB)
Collecting beautifulsoup4
Using cached beautifulsoup4-4.11.1-py3-none-any.whl (128 kB)
Collecting pandocfilters>=1.4.1
Using cached pandocfilters-1.5.0-py2.py3-none-any.whl (8.7 kB)
Collecting bleach
Using cached bleach-5.0.1-py3-none-any.whl (160 kB)
Collecting defusedxml
Using cached defusedxml-0.7.1-py2.py3-none-any.whl (25 kB)
Collecting mistune<3,>=2.0.3
Using cached mistune-2.0.4-py2.py3-none-any.whl (24 kB)
Collecting jupyterlab-pygments
Using cached jupyterlab_pygments-0.2.2-py2.py3-none-any.whl (21 kB)
Collecting fastjsonschema
Using cached fastjsonschema-2.16.2-py3-none-any.whl (22 kB)
Collecting ptyprocess>=0.5
Using cached ptyprocess-0.7.0-py2.py3-none-any.whl (13 kB)
Collecting wcwidth
Using cached wcwidth-0.2.5-py2.py3-none-any.whl (30 kB)
Collecting argon2-cffi-bindings
Using cached argon2_cffi_bindings-21.2.0-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (86 kB)
Collecting pytz>=2015.7
Using cached pytz-2022.4-py2.py3-none-any.whl (500 kB)
Collecting psutil
Using cached psutil-5.9.2-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (282 kB)
Collecting debugpy>=1.0
Using cached debugpy-1.6.3-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (1.8 MB)
Collecting charset-normalizer<3,>=2
Using cached charset_normalizer-2.1.1-py3-none-any.whl (39 kB)
Collecting certifi>=2017.4.17
Using cached certifi-2022.9.24-py3-none-any.whl (161 kB)
Collecting urllib3<1.27,>=1.21.1
Using cached urllib3-1.26.12-py2.py3-none-any.whl (140 kB)
Collecting executing
Using cached executing-1.1.1-py2.py3-none-any.whl (22 kB)
Collecting asttokens
Using cached asttokens-2.0.8-py2.py3-none-any.whl (23 kB)
Collecting pure-eval
Using cached pure_eval-0.2.2-py3-none-any.whl (11 kB)
Collecting six>=1.5
Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting cffi>=1.0.1
Using cached cffi-1.15.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (441 kB)
Collecting soupsieve>1.2
Using cached soupsieve-2.3.2.post1-py3-none-any.whl (37 kB)
Collecting webencodings
Using cached webencodings-0.5.1-py2.py3-none-any.whl (11 kB)
Collecting pycparser
Using cached pycparser-2.21-py2.py3-none-any.whl (118 kB)
Installing collected packages: webencodings, wcwidth, Send2Trash, pytz, pure-eval, ptyprocess, pickleshare, mistune, json5, ipython-genutils, fastjsonschema, executing, backcall, websocket-client, urllib3, traitlets, tornado, tomli, tinycss2, soupsieve, sniffio, six, pyzmq, pyrsistent, pyparsing, pygments, pycparser, psutil, prompt-toolkit, prometheus-client, pluggy, pexpect, pathspec, parso, pandocfilters, nest-asyncio, MarkupSafe, jupyterlab-pygments, idna, entrypoints, editables, defusedxml, decorator, debugpy, charset-normalizer, certifi, babel, attrs, terminado, requests, python-dateutil, packaging, matplotlib-inline, jupyter-core, jsonschema, jinja2, jedi, cffi, bleach, beautifulsoup4, asttokens, anyio, stack-data, nbformat, jupyter-client, hatchling, argon2-cffi-bindings, nbclient, ipython, hatch-nodejs-version, argon2-cffi, nbconvert, ipykernel, notebook, jupyter-server, notebook-shim, jupyterlab-server, nbclassic, jupyterlab
Successfully installed MarkupSafe-2.1.1 Send2Trash-1.8.0 anyio-3.6.1 argon2-cffi-21.3.0 argon2-cffi-bindings-21.2.0 asttokens-2.0.8 attrs-22.1.0 babel-2.10.3 backcall-0.2.0 beautifulsoup4-4.11.1 bleach-5.0.1 certifi-2022.9.24 cffi-1.15.1 charset-normalizer-2.1.1 debugpy-1.6.3 decorator-5.1.1 defusedxml-0.7.1 editables-0.3 entrypoints-0.4 executing-1.1.1 fastjsonschema-2.16.2 hatch-nodejs-version-0.3.0 hatchling-1.11.0 idna-3.4 ipykernel-6.16.0 ipython-8.5.0 ipython-genutils-0.2.0 jedi-0.18.1 jinja2-3.1.2 json5-0.9.10 jsonschema-4.16.0 jupyter-client-7.3.5 jupyter-core-4.11.1 jupyter-server-1.19.1 jupyterlab-3.4.8 jupyterlab-pygments-0.2.2 jupyterlab-server-2.15.2 matplotlib-inline-0.1.6 mistune-2.0.4 nbclassic-0.4.5 nbclient-0.7.0 nbconvert-7.2.1 nbformat-5.7.0 nest-asyncio-1.5.6 notebook-6.4.12 notebook-shim-0.1.0 packaging-21.3 pandocfilters-1.5.0 parso-0.8.3 pathspec-0.10.1 pexpect-4.8.0 pickleshare-0.7.5 pluggy-1.0.0 prometheus-client-0.14.1 prompt-toolkit-3.0.31 psutil-5.9.2 ptyprocess-0.7.0 pure-eval-0.2.2 pycparser-2.21 pygments-2.13.0 pyparsing-3.0.9 pyrsistent-0.18.1 python-dateutil-2.8.2 pytz-2022.4 pyzmq-24.0.1 requests-2.28.1 six-1.16.0 sniffio-1.3.0 soupsieve-2.3.2.post1 stack-data-0.5.1 terminado-0.16.0 tinycss2-1.1.1 tomli-2.0.1 tornado-6.2 traitlets-5.4.0 urllib3-1.26.12 wcwidth-0.2.5 webencodings-0.5.1 websocket-client-1.4.1
Installing build dependencies ... done
Running command Checking if build backend supports build_editable
Checking if build backend supports build_editable ... done
Running command Getting requirements to build editable
Getting requirements to build editable ... done
Running command pip subprocess to install backend dependencies
Collecting hatch-jupyter-builder>=0.5
Using cached hatch_jupyter_builder-0.8.0-py3-none-any.whl (17 kB)
Collecting hatchling
Using cached hatchling-1.11.0-py3-none-any.whl (73 kB)
Collecting pathspec>=0.10.1
Using cached pathspec-0.10.1-py3-none-any.whl (27 kB)
Collecting packaging>=21.3
Using cached packaging-21.3-py3-none-any.whl (40 kB)
Collecting tomli>=1.2.2
Using cached tomli-2.0.1-py3-none-any.whl (12 kB)
Collecting pluggy>=1.0.0
Using cached pluggy-1.0.0-py2.py3-none-any.whl (13 kB)
Collecting editables>=0.3
Using cached editables-0.3-py3-none-any.whl (4.7 kB)
Collecting pyparsing!=3.0.5,>=2.0.2
Using cached pyparsing-3.0.9-py3-none-any.whl (98 kB)
Installing collected packages: tomli, pyparsing, pluggy, pathspec, editables, packaging, hatchling, hatch-jupyter-builder
Successfully installed editables-0.3 hatch-jupyter-builder-0.8.0 hatchling-1.11.0 packaging-21.3 pathspec-0.10.1 pluggy-1.0.0 pyparsing-3.0.9 tomli-2.0.1
Installing backend dependencies ... done
Running command Preparing editable metadata (pyproject.toml)
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': 'stockWhiz01/labextension'}
INFO:hatch_jupyter_builder.utils:Installing build dependencies with npm. This may take a while...
INFO:hatch_jupyter_builder.utils:> /tmp/pip-build-env-4een4_o_/overlay/bin/jlpm install
yarn install v1.21.1
info No lockfile found.
[1/4] Resolving packages...
warning #jupyterlab/application > #jupyterlab/apputils > url > querystring#0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
warning #jupyterlab/application > #jupyterlab/ui-components > #blueprintjs/core > popper.js#1.16.1: You can find the new Popper v2 at #popperjs/core, this package is dedicated to the legacy v1
warning #jupyterlab/application > #jupyterlab/ui-components > #blueprintjs/core > react-popper > popper.js#1.16.1: You can find the new Popper v2 at #popperjs/core, this package is dedicated to the legacy v1
warning #jupyterlab/builder > #jupyterlab/buildutils > crypto#1.0.1: This package is no longer supported. It's now a built-in Node module. If you've depended on crypto, you should switch to the one that's built-in.
warning #jupyterlab/builder > #jupyterlab/buildutils > verdaccio > request#2.88.0: request has been deprecated, see https://github.com/request/request/issues/3142
warning #jupyterlab/builder > #jupyterlab/buildutils > verdaccio > request > har-validator#5.1.5: this library is no longer supported
warning #jupyterlab/builder > #jupyterlab/buildutils > verdaccio > request > uuid#3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
warning #jupyterlab/testutils > jest-junit > uuid#3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
warning #jupyterlab/testutils > jest > #jest/core > jest-haste-map > sane#4.1.0: some dependency vulnerabilities fixed, support for node < 10 dropped, and newer ECMAScript syntax/features added
warning #jupyterlab/testutils > jest > #jest/core > jest-haste-map > sane > micromatch > snapdragon > source-map-resolve#0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
warning #jupyterlab/testutils > jest > #jest/core > jest-haste-map > sane > micromatch > snapdragon > source-map-resolve > resolve-url#0.2.1: https://github.com/lydell/resolve-url#deprecated
warning #jupyterlab/testutils > jest > #jest/core > jest-haste-map > sane > micromatch > snapdragon > source-map-resolve > urix#0.1.0: Please see https://github.com/lydell/urix#deprecated
warning #jupyterlab/testutils > jest > #jest/core > jest-haste-map > sane > micromatch > snapdragon > source-map-resolve > source-map-url#0.4.1: See https://github.com/lydell/source-map-url#deprecated
[2/4] Fetching packages...
info fsevents#2.3.2: The platform "linux" is incompatible with this module.
info "fsevents#2.3.2" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning "#jupyterlab/application > #jupyterlab/ui-components#3.4.8" has unmet peer dependency "react#^17.0.1".
warning "#jupyterlab/application > #lumino/coreutils#1.12.1" has unmet peer dependency "crypto#1.0.1".
warning "#jupyterlab/application > #jupyterlab/rendermime > #jupyterlab/codemirror > y-codemirror#3.0.1" has unmet peer dependency "yjs#^13.5.17".
warning "#jupyterlab/builder > #jupyterlab/buildutils > verdaccio > clipanion#3.1.0" has unmet peer dependency "typanion#*".
warning Workspaces can only be enabled in private projects.
warning Workspaces can only be enabled in private projects.
[4/4] Building fresh packages...
success Saved lockfile.
Done in 384.66s.
INFO:hatch_jupyter_builder.utils:> /tmp/pip-build-env-4een4_o_/overlay/bin/jlpm run install:extension
yarn run v1.21.1
$ jlpm build
$ jlpm build:lib && jlpm build:labextension:dev
$ tsc
$ jupyter labextension build --development True .
Building extension in .
/home/savakar/Documents/PROJECTS/JupyterLabExtension/stockWhiz01/node_modules/typescript/lib/typescript.js:141092
changeTracker.replaceNode(propertyDeclarationSo
^^^^^^^^^^^^^^^^^^^^^
SyntaxError: missing ) after argument list
at Object.compileFunction (node:vm:360:18)
at wrapSafe (node:internal/modules/cjs/loader:1078:15)
at Module._compile (node:internal/modules/cjs/loader:1113:27)
at Module._extensions..js (node:internal/modules/cjs/loader:1203:10)
at Module.load (node:internal/modules/cjs/loader:1027:32)
at Module._load (node:internal/modules/cjs/loader:868:12)
at Module.require (node:internal/modules/cjs/loader:1051:19)
at require (node:internal/modules/cjs/helpers:103:18)
at Object.<anonymous> (/home/savakar/Documents/PROJECTS/JupyterLabExtension/stockWhiz01/node_modules/#jupyterlab/buildutils/lib/ensure-package.js:32:25)
at Module._compile (node:internal/modules/cjs/loader:1149:14)
Node.js v18.10.0
An error occurred.
subprocess.CalledProcessError: Command '['node', '/home/savakar/Documents/PROJECTS/JupyterLabExtension/stockWhiz01/node_modules/#jupyterlab/builder/lib/build-labextension.js', '--core-path', '/tmp/pip-build-env-4een4_o_/overlay/lib/python3.10/site-packages/jupyterlab/staging', '/home/savakar/Documents/PROJECTS/JupyterLabExtension/stockWhiz01', '--development']' returned non-zero exit status 1.
See the log file for details: /tmp/jupyterlab-debug-logmwuri.log
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Traceback (most recent call last):
File "/home/savakar/miniconda3/envs/jupyterlab-ext/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 177, 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/savakar/miniconda3/envs/jupyterlab-ext/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module>
main()
File "/home/savakar/miniconda3/envs/jupyterlab-ext/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/home/savakar/miniconda3/envs/jupyterlab-ext/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 186, in prepare_metadata_for_build_editable
whl_basename = build_hook(metadata_directory, config_settings)
File "/tmp/pip-build-env-4een4_o_/overlay/lib/python3.10/site-packages/hatchling/build.py", line 61, in build_editable
return os.path.basename(next(builder.build(wheel_directory, ['editable'])))
File "/tmp/pip-build-env-4een4_o_/overlay/lib/python3.10/site-packages/hatchling/builders/plugin/interface.py", line 136, in build
build_hook.initialize(version, build_data)
File "/tmp/pip-build-env-4een4_o_/normal/lib/python3.10/site-packages/hatch_jupyter_builder/plugin.py", line 83, in initialize
raise e
File "/tmp/pip-build-env-4een4_o_/normal/lib/python3.10/site-packages/hatch_jupyter_builder/plugin.py", line 78, in initialize
build_func(self.target_name, version, **build_kwargs)
File "/tmp/pip-build-env-4een4_o_/normal/lib/python3.10/site-packages/hatch_jupyter_builder/utils.py", line 116, in npm_builder
run(npm_cmd + ["run", build_cmd], cwd=str(abs_path))
File "/tmp/pip-build-env-4een4_o_/normal/lib/python3.10/site-packages/hatch_jupyter_builder/utils.py", line 225, in run
return subprocess.check_call(cmd, **kwargs)
File "/home/savakar/miniconda3/envs/jupyterlab-ext/lib/python3.10/subprocess.py", line 369, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/tmp/pip-build-env-4een4_o_/overlay/bin/jlpm', 'run', 'install:extension']' 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/savakar/miniconda3/envs/jupyterlab-ext/bin/python3.10 /home/savakar/miniconda3/envs/jupyterlab-ext/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py prepare_metadata_for_build_editable /tmp/tmpnb1xd5vq
cwd: /home/savakar/Documents/PROJECTS/JupyterLabExtension/stockWhiz01
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.
Could you please direct me towards a solution.
--- edit
There is no mention of the hatchling file during pip freeze command.
flit_core # file:///home/conda/feedstock_root/build_artifacts/flit-core_1645629044586/work/source/flit_core
idna # file:///home/conda/feedstock_root/build_artifacts/idna_1663625384323/work
whereas during the the install command the first package collected is hatchling.
I am trying to deploy an app using elasticbeanstalk with Python 3.8. I am using the following requirements.txt
click==8.0.1
Flask==1.1.2
Flask-SQLAlchemy==2.5.1
greenlet==1.1.0
itsdangerous==2.0.1
Jinja2==3.0.1
MarkupSafe==2.0.1
marshmallow==3.12.1
marshmallow-sqlalchemy==0.25.0
SQLAlchemy==1.4.15
Werkzeug==2.0.1
celery[redis]
psycopg2==2.9.3
Flask-JWT-Extended==4.3.1
Flask-RESTful==0.3.9
python-decouple==3.6
When I run the command eb create, I get the following error
2022-04-05 22:03:00 INFO Created security group named: sg-00b14485064e5e8ca
2022-04-05 22:03:16 INFO Created security group named: awseb-e-ekd3bw2bvf-stack-AWSEBSecurityGroup-1O3NAVBIRRK30
2022-04-05 22:03:31 INFO Created Auto Scaling launch configuration named: awseb-e-ekd3bw2bvf-stack-AWSEBAutoScalingLaunchConfiguration-HKjIVsa84E3U
2022-04-05 22:04:49 INFO Created Auto Scaling group named: awseb-e-ekd3bw2bvf-stack-AWSEBAutoScalingGroup-5FQOAWMGCR3W
2022-04-05 22:04:49 INFO Waiting for EC2 instances to launch. This may take a few minutes.
2022-04-05 22:04:49 INFO Created Auto Scaling group policy named: arn:aws:autoscaling:us-east-1:208357543212:scalingPolicy:ecfbbff0-4151-492f-a474-ba01535ad348:autoScalingGroupName/awseb-e-ekd3bw2bvf-stack-AWSEBAutoScalingGroup-5FQOAWMGCR3W:policyName/awseb-e-ekd3bw2bvf-stack-AWSEBAutoScalingScaleDownPolicy-CI2UIP6X023P
2022-04-05 22:04:49 INFO Created Auto Scaling group policy named: arn:aws:autoscaling:us-east-1:208357543212:scalingPolicy:d534189a-45e3-48f1-a206-720f202b4469:autoScalingGroupName/awseb-e-ekd3bw2bvf-stack-AWSEBAutoScalingGroup-5FQOAWMGCR3W:policyName/awseb-e-ekd3bw2bvf-stack-AWSEBAutoScalingScaleUpPolicy-1F0WVTUXXPFKF
2022-04-05 22:05:04 INFO Created CloudWatch alarm named: awseb-e-ekd3bw2bvf-stack-AWSEBCloudwatchAlarmLow-W8URMJEYBO3C
2022-04-05 22:05:04 INFO Created CloudWatch alarm named: awseb-e-ekd3bw2bvf-stack-AWSEBCloudwatchAlarmHigh-13J8QHI51MEBM
2022-04-05 22:06:09 INFO Created load balancer named: arn:aws:elasticloadbalancing:us-east-1:208357543212:loadbalancer/app/awseb-AWSEB-IXOR2Z0K0OJV/1fba4c6ff6122c55
2022-04-05 22:06:24 INFO Created Load Balancer listener named: arn:aws:elasticloadbalancing:us-east-1:208357543212:listener/app/awseb-AWSEB-IXOR2Z0K0OJV/1fba4c6ff6122c55/734b0cf960b6b8c4
2022-04-05 22:06:42 ERROR Instance deployment failed to install application dependencies. The deployment failed.
2022-04-05 22:06:42 ERROR Instance deployment failed. For details, see 'eb-engine.log'.
2022-04-05 22:06:44 ERROR [Instance: i-0368a7ba2157241f4] Command failed on instance. Return code: 1 Output: Engine execution has encountered an error..
2022-04-05 22:06:45 INFO Command execution completed on all instances. Summary: [Successful: 0, Failed: 1].
2022-04-05 22:07:48 ERROR Create environment operation is complete, but with errors. For more information, see troubleshooting documentation.
I look at the corresponding logs and I get the following error:
Collecting Werkzeug==2.0.1
Downloading Werkzeug-2.0.1-py3-none-any.whl (288 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 288.2/288.2 KB 35.6 MB/s eta 0:00:00
Collecting celery[redis]
Downloading celery-5.2.6-py3-none-any.whl (405 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 405.6/405.6 KB 54.7 MB/s eta 0:00:00
Collecting psycopg2==2.9.3
Downloading psycopg2-2.9.3.tar.gz (380 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 380.6/380.6 KB 52.2 MB/s eta 0:00:00
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'error'
2022/04/05 22:06:42.952376 [INFO] error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [23 lines of output]
running egg_info
creating /tmp/pip-pip-egg-info-v0aygozt/psycopg2.egg-info
writing /tmp/pip-pip-egg-info-v0aygozt/psycopg2.egg-info/PKG-INFO
writing dependency_links to /tmp/pip-pip-egg-info-v0aygozt/psycopg2.egg-info/dependency_links.txt
writing top-level names to /tmp/pip-pip-egg-info-v0aygozt/psycopg2.egg-info/top_level.txt
writing manifest file '/tmp/pip-pip-egg-info-v0aygozt/psycopg2.egg-info/SOURCES.txt'
Error: pg_config executable not found.
pg_config is required to build psycopg2 from source. Please add the directory
containing pg_config to the $PATH or specify the full executable path with the
option:
python setup.py build_ext --pg-config /path/to/pg_config build ...
or with the pg_config option in 'setup.cfg'.
If you prefer to avoid building psycopg2 from source, please install the PyPI
'psycopg2-binary' package instead.
For further information please check the 'doc/src/install.rst' file (also at
<https://www.psycopg.org/docs/install.html>).
[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 am not quite familiar with the requirements of AWS, but I could run the app locally and without any problem. I just wonder what would be a right configuration for the requirements.txt file in order to avoid the bug.
Thanks in advance.
You have to install postgresql-devel first before you can use psycopg2. You can add the installation instructions to your ebextentions:
packages:
yum:
postgresql-devel: []
or
commands:
command1:
command: yum install -y postgresql-devel
I could solve the error. I have to change psycopg2 by psycopg2-binary as it was suggested by the AWS logs:
If you prefer to avoid building psycopg2 from source, please install the PyPI
'psycopg2-binary' package instead.
This issue has to be with the particular configuration of the libraries and the specific Linux machines used in AWS.
can someone list the differences between pyserial 2.6 and pyserial 2.7
I'm unable to get the release notes for both the releases.
The list is maintained in CHANGES.rst on GitHub.
Version 2.7 2013-10-17
Win32: setRTS and setDTR can be called before the port is opened and it will set the initial state on port open.
Posix: add platform specific method: outWaiting (already present for Win32)
Posix: rename flowControl to setXON to match name on Win32, add flowControlOut function
rfc2217: zero polls value (baudrate, data size, stop bits, parity) (Erik Lundh)
Posix: [Patch pyserial:28] Accept any speed on Linux [update]
Posix: [Patch pyserial:29] PosixSerial.read() should "ignore" errno.EINTR
OSX: [Patch pyserial:27] Scan by VendorID/Product ID for USB Serial devices
Ensure working with bytes in write() calls
Bugfixes:
[Bug 3540332] SerialException not returned
[Bug pyserial:145] Error in socket_connection.py
[Bug pyserial:135] reading from socket with timeout=None causes TypeError
[Bug pyserial:130] setup.py should not append py3k to package name
[Bug pyserial:117] no error on lost conn w/socket://
Bugfixes (posix):
[Patch 3462364] Fix: NameError: global name 'base' is not defined
list_ports and device() for BSD updated (Anders Langworthy)
[Bug 3518380] python3.2 -m serial.tools.list_ports error
[Bug pyserial:137] Patch to add non-standard baudrates to Cygwin
[Bug pyserial:141] open: Pass errno from IOError to SerialException
[Bug pyserial:125] Undefined 'base' on list_ports_posix.py, function usb_lsusb
[Bug pyserial:151] Serial.write() without a timeout uses 100% CPU on POSIX
[Patch pyserial:30] [PATCH 1/1] serial.Serial() should not raise IOError.
Bugfixes (win32):
[Bug 3444941] ctypes.WinError() unicode error
[Bug 3550043] on Windows in tools global name 'GetLastError' is not defined
[Bug pyserial:146] flush() does nothing in windows (despite docs)
[Bug pyserial:144] com0com ports ignored due to missing "friendly name"
[Bug pyserial:152] Cannot configure port, some setting was wrong. Can leave port handle open but port not accessible
so I've got Python 2.7 properly install on CentOS, with pip configured to install packages on a custom location.
Everything has worked so far, but now I'm installing Jupyter like so:
pip install jupyter
And I get this output:
Collecting jupyter
/usr/local/lib/python2.7/site-packages/pip-7.1.2-py2.7.egg/pip/_vendor/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
Using cached jupyter-1.0.0-py2.py3-none-any.whl
Collecting notebook (from jupyter)
Using cached notebook-4.1.0-py2.py3-none-any.whl
Collecting ipywidgets (from jupyter)
Using cached ipywidgets-4.1.1-py2.py3-none-any.whl
Collecting nbconvert (from jupyter)
Using cached nbconvert-4.1.0-py2.py3-none-any.whl
Collecting ipykernel (from jupyter)
Using cached ipykernel-4.3.1-py2.py3-none-any.whl
Collecting jupyter-console (from jupyter)
Using cached jupyter_console-4.1.1-py2.py3-none-any.whl
Collecting qtconsole (from jupyter)
Using cached qtconsole-4.2.0-py2.py3-none-any.whl
Collecting traitlets (from notebook->jupyter)
Using cached traitlets-4.1.0-py2.py3-none-any.whl
Collecting tornado>=4 (from notebook->jupyter)
Collecting jupyter-client (from notebook->jupyter)
Using cached jupyter_client-4.2.1-py2.py3-none-any.whl
Collecting nbformat (from notebook->jupyter)
Using cached nbformat-4.0.1-py2.py3-none-any.whl
Collecting jupyter-core (from notebook->jupyter)
Using cached jupyter_core-4.1.0-py2.py3-none-any.whl
Collecting terminado>=0.3.3 (from notebook->jupyter)
Collecting ipython-genutils (from notebook->jupyter)
Using cached ipython_genutils-0.1.0-py2.py3-none-any.whl
Collecting jinja2 (from notebook->jupyter)
Using cached Jinja2-2.8-py2.py3-none-any.whl
Collecting ipython>=4.0.0dev0 (from ipywidgets->jupyter)
Using cached ipython-4.1.2-py2-none-any.whl
Collecting pygments (from nbconvert->jupyter)
Using cached Pygments-2.1.3-py2.py3-none-any.whl
Collecting mistune!=0.6 (from nbconvert->jupyter)
Using cached mistune-0.7.2-py2.py3-none-any.whl
Collecting decorator (from traitlets->notebook->jupyter)
Using cached decorator-4.0.9-py2.py3-none-any.whl
Collecting certifi (from tornado>=4->notebook->jupyter)
Using cached certifi-2016.2.28-py2.py3-none-any.whl
Collecting backports-abc>=0.4 (from tornado>=4->notebook->jupyter)
Using cached backports_abc-0.4-py2.py3-none-any.whl
Collecting backports.ssl-match-hostname (from tornado>=4->notebook->jupyter)
Collecting singledispatch (from tornado>=4->notebook->jupyter)
Using cached singledispatch-3.4.0.3-py2.py3-none-any.whl
Collecting pyzmq>=13 (from jupyter-client->notebook->jupyter)
Collecting jsonschema!=2.5.0,>=2.0 (from nbformat->notebook->jupyter)
Using cached jsonschema-2.5.1-py2.py3-none-any.whl
Collecting ptyprocess (from terminado>=0.3.3->notebook->jupyter)
Using cached ptyprocess-0.5.1-py2.py3-none-any.whl
Collecting MarkupSafe (from jinja2->notebook->jupyter)
Collecting pickleshare (from ipython>=4.0.0dev0->ipywidgets->jupyter)
Using cached pickleshare-0.6-py2.py3-none-any.whl
Collecting simplegeneric>0.8 (from ipython>=4.0.0dev0->ipywidgets->jupyter)
Collecting setuptools>=18.5 (from ipython>=4.0.0dev0->ipywidgets->jupyter)
Using cached setuptools-20.2.2-py2.py3-none-any.whl
Collecting pexpect (from ipython>=4.0.0dev0->ipywidgets->jupyter)
Collecting six (from singledispatch->tornado>=4->notebook->jupyter)
Using cached six-1.10.0-py2.py3-none-any.whl
Collecting functools32 (from jsonschema!=2.5.0,>=2.0->nbformat->notebook->jupyter)
Collecting path.py>=6.2 (from pickleshare->ipython>=4.0.0dev0->ipywidgets->jupyter)
Using cached path.py-8.1.2-py2.py3-none-any.whl
Installing collected packages: decorator, ipython-genutils, traitlets, certifi, backports-abc, backports.ssl-match-hostname, six, singledispatch, tornado, jupyter-core, pyzmq, jupyter-client, functools32, jsonschema, nbformat, pygments, mistune, MarkupSafe, jinja2, nbconvert, path.py, pickleshare, simplegeneric, setuptools, ptyprocess, pexpect, ipython, ipykernel, terminado, notebook, ipywidgets, jupyter-console, qtconsole, jupyter
Successfully installed MarkupSafe-0.23 backports-abc-0.4 backports.ssl-match-hostname-3.5.0.1 certifi-2016.2.28 decorator-4.0.9 functools32-3.2.3.post2 ipykernel-4.3.1 ipython-4.1.2 ipython-genutils-0.1.0 ipywidgets-4.1.1 jinja2-2.8 jsonschema-2.5.1 jupyter jupyter-client-4.2.1 jupyter-console-4.1.1 jupyter-core-4.0.6 mistune-0.7.2 nbconvert-4.1.0 nbformat-4.0.1 notebook-4.1.0 path.py-8.1.2 pexpect-4.0.1 pickleshare-0.6 ptyprocess-0.5.1 pygments-2.1.3 pyzmq-15.2.0 qtconsole-4.2.0 setuptools-20.2.2 simplegeneric-0.8.1 singledispatch-3.4.0.3 six-1.10.0 terminado-0.6 tornado-4.3 traitlets-4.1.0
But my problem is that even though pip says everything went well with the install, I don't get the jupyter command line tool. If I run jupyter from the command line, I get "command not found".
Any ideas why this might be happening?
Edit with more info
Shell used: bash
Output from type jupyter:
bash: type: jupyter: not found
Results from find / -name jupyter: nothing found