-
Notifications
You must be signed in to change notification settings - Fork 386
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
"pip install ." for Jupytext requires nodejs #706
Comments
Do you know where the dependency is coming from? I'm also having the issue after I rebased the latest changes to master but I don't really understand it. Is it because you added |
Yes, the dependency is coming from |
Yeah, I can confirm this issue doesn't exist on the only version of JuPyText, I've been using for pre-commit hooks. |
This issue marked as closed now, but it's not solved, at least for me. Full output from a clean virtualenv: $ pip install git+ssh://[email protected]/mwouts/jupytext@master
Collecting git+ssh://****@github.com/mwouts/jupytext@master
Cloning ssh://****@github.com/mwouts/jupytext (to revision master) to /private/var/folders/ch/6nbm4wyn01j4gcjjxgq2r0sr0000gp/T/pip-req-build-a5hiqof3
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... done
Collecting markdown-it-py~=0.6.0
Using cached markdown_it_py-0.6.1-py3-none-any.whl (81 kB)
Collecting attrs<21,>=19
Using cached attrs-20.3.0-py2.py3-none-any.whl (49 kB)
Collecting mdit-py-plugins~=0.2.1
Using cached mdit_py_plugins-0.2.4-py3-none-any.whl (39 kB)
Collecting nbformat>=4.0.0
Using cached nbformat-5.0.8-py3-none-any.whl (172 kB)
Collecting ipython-genutils
Using cached ipython_genutils-0.2.0-py2.py3-none-any.whl (26 kB)
Collecting jsonschema!=2.5.0,>=2.4
Using cached jsonschema-3.2.0-py2.py3-none-any.whl (56 kB)
Requirement already satisfied: setuptools in ./lib/python3.8/site-packages (from jsonschema!=2.5.0,>=2.4->nbformat>=4.0.0->jupytext==1.9.1+dev) (51.0.0)
Collecting jupyter-core
Using cached jupyter_core-4.7.0-py3-none-any.whl (82 kB)
Collecting pyrsistent>=0.14.0
Using cached pyrsistent-0.17.3-cp38-cp38-macosx_10_15_x86_64.whl
Collecting pyyaml
Using cached PyYAML-5.3.1-cp38-cp38-macosx_10_15_x86_64.whl
Collecting six>=1.11.0
Using cached six-1.15.0-py2.py3-none-any.whl (10 kB)
Collecting toml
Using cached toml-0.10.2-py2.py3-none-any.whl (16 kB)
Collecting traitlets>=4.1
Using cached traitlets-5.0.5-py3-none-any.whl (100 kB)
Building wheels for collected packages: jupytext
Building wheel for jupytext (PEP 517) ... error
ERROR: Command errored out with exit status 1:
command: /Users/cw0504/.virtualenvs/tmp-90cf416c5e0740c/bin/python /Users/cw0504/.virtualenvs/tmp-90cf416c5e0740c/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py build_wheel /var/folders/ch/6nbm4wyn01j4gcjjxgq2r0sr0000gp/T/tmp0wt8k8e5
cwd: /private/var/folders/ch/6nbm4wyn01j4gcjjxgq2r0sr0000gp/T/pip-req-build-a5hiqof3
Complete output (51 lines):
running bdist_wheel
running jsdeps
Installing build dependencies with npm. This may take a while...
> jlpm install
Fail to get yarn configuration. dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.64.dylib
Referenced from: /usr/local/bin/node
Reason: image not found
dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.64.dylib
Referenced from: /usr/local/bin/node
Reason: image not found
Traceback (most recent call last):
File "/Users/cw0504/.virtualenvs/tmp-90cf416c5e0740c/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py", line 280, in <module>
main()
File "/Users/cw0504/.virtualenvs/tmp-90cf416c5e0740c/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py", line 263, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/Users/cw0504/.virtualenvs/tmp-90cf416c5e0740c/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py", line 204, in build_wheel
return _build_backend().build_wheel(wheel_directory, config_settings,
File "/private/var/folders/ch/6nbm4wyn01j4gcjjxgq2r0sr0000gp/T/pip-build-env-gjimzwy2/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 216, in build_wheel
return self._build_with_temp_dir(['bdist_wheel'], '.whl',
File "/private/var/folders/ch/6nbm4wyn01j4gcjjxgq2r0sr0000gp/T/pip-build-env-gjimzwy2/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 202, in _build_with_temp_dir
self.run_setup()
File "/private/var/folders/ch/6nbm4wyn01j4gcjjxgq2r0sr0000gp/T/pip-build-env-gjimzwy2/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 145, in run_setup
exec(compile(code, __file__, 'exec'), locals())
File "setup.py", line 87, in <module>
setup(
File "/private/var/folders/ch/6nbm4wyn01j4gcjjxgq2r0sr0000gp/T/pip-build-env-gjimzwy2/overlay/lib/python3.8/site-packages/setuptools/__init__.py", line 153, in setup
return distutils.core.setup(**attrs)
File "/Users/cw0504/.pyenv/versions/3.8.3/lib/python3.8/distutils/core.py", line 148, in setup
dist.run_commands()
File "/Users/cw0504/.pyenv/versions/3.8.3/lib/python3.8/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/Users/cw0504/.pyenv/versions/3.8.3/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/private/var/folders/ch/6nbm4wyn01j4gcjjxgq2r0sr0000gp/T/pip-build-env-gjimzwy2/overlay/lib/python3.8/site-packages/jupyter_packaging/setupbase.py", line 503, in run
[self.run_command(cmd) for cmd in cmds]
File "/private/var/folders/ch/6nbm4wyn01j4gcjjxgq2r0sr0000gp/T/pip-build-env-gjimzwy2/overlay/lib/python3.8/site-packages/jupyter_packaging/setupbase.py", line 503, in <listcomp>
[self.run_command(cmd) for cmd in cmds]
File "/Users/cw0504/.pyenv/versions/3.8.3/lib/python3.8/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/Users/cw0504/.pyenv/versions/3.8.3/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/private/var/folders/ch/6nbm4wyn01j4gcjjxgq2r0sr0000gp/T/pip-build-env-gjimzwy2/overlay/lib/python3.8/site-packages/jupyter_packaging/setupbase.py", line 274, in run
c.run()
File "/private/var/folders/ch/6nbm4wyn01j4gcjjxgq2r0sr0000gp/T/pip-build-env-gjimzwy2/overlay/lib/python3.8/site-packages/jupyter_packaging/setupbase.py", line 379, in run
run(npm_cmd + ['install'], cwd=node_package)
File "/private/var/folders/ch/6nbm4wyn01j4gcjjxgq2r0sr0000gp/T/pip-build-env-gjimzwy2/overlay/lib/python3.8/site-packages/jupyter_packaging/setupbase.py", line 225, in run
return subprocess.check_call(cmd, **kwargs)
File "/Users/cw0504/.pyenv/versions/3.8.3/lib/python3.8/subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/private/var/folders/ch/6nbm4wyn01j4gcjjxgq2r0sr0000gp/T/pip-build-env-gjimzwy2/overlay/bin/jlpm', 'install']' died with <Signals.SIGABRT: 6>.
----------------------------------------
ERROR: Failed building wheel for jupytext
Failed to build jupytext
ERROR: Could not build wheels for jupytext which use PEP 517 and cannot be installed directly |
I see... so my attempt to find out whether I'll propose another approach based on an environment variable. In addition I expect a significant improvement in terms of speed. Yesterday I measured the following times for
|
@JohnPaton , now we'll do the switch based on the environment variables |
I am having this issue when trying to install the jupytext pre-commit hook. I am running ---
default_language_version:
python: python3
repos:
- repo: https://github.com/mwouts/jupytext
rev: v1.16.1
hooks:
- id: jupytext
args: [ --sync ]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-json
- id: check-merge-conflict
- id: check-toml
- id: check-yaml
- id: debug-statements
- id: detect-private-key
- id: end-of-file-fixer
- id: name-tests-test
args: [--pytest-test-first]
- id: trailing-whitespace
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.14
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- id: ruff-format
|
Hey @gunnhildsp , yes we are aware of this issue in the context of the pre-commit hook, cf. #1210. The idea would be to set an environment variable |
We are working on a pre-commit-hook for Jupytext with @JohnPaton and @Skylion007 at #698.
I was giving a try at this
.pre-commit-config.yaml
file:in order to test the PR.
Unfortunately, the installation of Jupytext fails with this error:
Another (simpler) way to reproduce the error is to try
pip install .
in thejupytext-dev
environment.I also note that the problem disappears when I install
nodejs
in that environment, however, I don't think we can or should take a dependency onnodejs
! Especially in the context of pre-commit hooks, where we want to install only the CLI part of Jupytext.The text was updated successfully, but these errors were encountered: