Я не могу обойтись без JupyterLab поэзией. Я продолжаю получать эту ошибку. Я пытался удалить кеш:
rm -rf ~/Library/Caches/pypoetry/artifacts/*
и
poetry cache clear pypi --all
но я продолжаю получать следующую ошибку:
$ poetry add --group dev jupyterlab
Using version ^3.6.1 for jupyterlab
Updating dependencies
Resolving dependencies... (2.6s)
Package operations: 12 installs, 0 updates, 0 removals
• Installing y-py (0.5.5): Failed
CalledProcessError
Command '['/Users/mc/Library/Caches/pypoetry/virtualenvs/showcase-project-lis5iaDt-py3.9/bin/python', '-m', 'pip', 'install', '--use-pep517', '--disable-pip-version-check', '--isolated', '--no-input', '--prefix', '/Users/mc/Library/Caches/pypoetry/virtualenvs/showcase-project-lis5iaDt-py3.9', '--no-deps', '/Users/mc/Library/Caches/pypoetry/artifacts/be/5d/9c/38ed00c38e66f11b3f1295c0b4fa2565c954b8e0c8d63deac26e996efa/y_py-0.5.5.tar.gz']' returned non-zero exit status 1.
at /opt/homebrew/Cellar/[email protected]/3.9.16/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py:528 in run
524│ # We don't call process.wait() as .__exit__ does that for us.
525│ raise
526│ retcode = process.poll()
527│ if check and retcode:
→ 528│ raise CalledProcessError(retcode, process.args,
529│ output=stdout, stderr=stderr)
530│ return CompletedProcess(process.args, retcode, stdout, stderr)
531│
532│
The following error occurred when trying to handle this error:
EnvCommandError
Command ['/Users/mc/Library/Caches/pypoetry/virtualenvs/showcase-project-lis5iaDt-py3.9/bin/python', '-m', 'pip', 'install', '--use-pep517', '--disable-pip-version-check', '--isolated', '--no-input', '--prefix', '/Users/mc/Library/Caches/pypoetry/virtualenvs/showcase-project-lis5iaDt-py3.9', '--no-deps', '/Users/mc/Library/Caches/pypoetry/artifacts/be/5d/9c/38ed00c38e66f11b3f1295c0b4fa2565c954b8e0c8d63deac26e996efa/y_py-0.5.5.tar.gz'] errored with the following return code 1, and output:
Processing /Users/mc/Library/Caches/pypoetry/artifacts/be/5d/9c/38ed00c38e66f11b3f1295c0b4fa2565c954b8e0c8d63deac26e996efa/y_py-0.5.5.tar.gz
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Preparing metadata (pyproject.toml): started
Preparing metadata (pyproject.toml): finished with status 'error'
error: subprocess-exited-with-error
× Preparing metadata (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [6 lines of output]
Cargo, the Rust package manager, is not installed or is not on PATH.
This package requires Rust and Cargo to compile extensions. Install it through
the system's package manager or via https://rustup.rs/
Checking for Rust toolchain....
[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.
at ~/Library/Application Support/pypoetry/venv/lib/python3.9/site-packages/poetry/utils/env.py:1540 in _run
1536│ output = subprocess.check_output(
1537│ command, stderr=subprocess.STDOUT, env=env, **kwargs
1538│ )
1539│ except CalledProcessError as e:
→ 1540│ raise EnvCommandError(e, input=input_)
1541│
1542│ return decode(output)
1543│
1544│ def execute(self, bin: str, *args: str, **kwargs: Any) -> int:
The following error occurred when trying to handle this error:
PoetryException
Failed to install /Users/mc/Library/Caches/pypoetry/artifacts/be/5d/9c/38ed00c38e66f11b3f1295c0b4fa2565c954b8e0c8d63deac26e996efa/y_py-0.5.5.tar.gz
at ~/Library/Application Support/pypoetry/venv/lib/python3.9/site-packages/poetry/utils/pip.py:58 in pip_install
54│
55│ try:
56│ return environment.run_pip(*args)
57│ except EnvCommandError as e:
→ 58│ raise PoetryException(f"Failed to install {path.as_posix()}") from e
59│
Информация об окружении
$ poetry env info
Virtualenv
Python: 3.9.16
Implementation: CPython
Path: /Users/mc/Library/Caches/pypoetry/virtualenvs/showcase-project-lis5iaDt-py3.9
Executable: /Users/mc/Library/Caches/pypoetry/virtualenvs/showcase-project-lis5iaDt-py3.9/bin/python
Valid: True
System
Platform: darwin
OS: posix
Python: 3.9.16
Path: /opt/homebrew/opt/[email protected]/Frameworks/Python.framework/Versions/3.9
Executable: /opt/homebrew/opt/[email protected]/Frameworks/Python.framework/Versions/3.9/bin/python3.9
Как я могу решить эту проблему с помощью пакета y_py
?
Мне действительно нужно установить ржавчину, чтобы использовать jupyterlab с поэзией, как указано в сообщении?
Вам нужно установить ржавчину и груз локально, чтобы запустить это
rustup — это установщик для
язык системного программирования
После этого попробуйте запустить poetry add --group dev jupyterlab
В пакете jupyterlab есть зависимости, требующие компиляции, и для создания этих зависимостей необходимы Rust и Cargo. Он пытается установить y-py, вы можете попробовать установить python из conda-forge, а затем установить y-py. может быть, это помогает, и поэзия работает без ржавчины и груза
В пакете jupyterlab есть зависимости, требующие компиляции, и для создания этих зависимостей необходимы Rust и Cargo. Он пытается установить y-py, вы можете попробовать установить python из conda-forge, а затем установить y-py. может быть, это помогает, и поэзия работает без ржавчины и груза
Кажется, в последней версии jupyterLab есть ошибка.
https://github.com/jupyterlab/jupyterlab/issues/12436
Просто установите старую версию jupyterlab:
poetry add --group dev jupyterlab==3.5.2
Можете ли вы уточнить, почему это необходимо для установки ржавчины, чтобы JupyterLab работал? Раньше я никогда не делал этого, например, при установке JL через conda или pip. Почему поэзия требует от меня установки ржавчины? В руководстве по установке \\jupyterLab никто не упоминает об этом требовании.