holzschu / Carnets

Carnets is a stand-alone Jupyter notebook server and client. Edit your notebooks on the go, even where there is no network.
https://holzschu.github.io/Carnets_Jupyter/
BSD 3-Clause "New" or "Revised" License
546 stars 31 forks source link

%pip install backports.lzma || py7zr can’t be installed #296

Open bebopimpromptu opened 1 year ago

bebopimpromptu commented 1 year ago

When trying to install, starts but it says “Failed to build backports.lzma” and other case “Preparing metadata (pyproject.toml): finished with status 'error'”. After the error kernel starts to works odd, every time when re starting the kernel died and then starts again.

holzschu commented 1 year ago

It's a bit more difficult to debug without the full error message, but backports.lzma tries to compile the lzma library and the xz command. Both of these require a compiler (to compile C source code and libraries), which does not exist on iOS. Hence they cannot be installed (only pure Python packages can be installed). Same with py7zr. You can use a-Shell to have the xz utility.

That being said, lzma is supposed to be included with Python versions after 3.3, so backports.lzma should not be necessary. I'll investigate.

jakirkham commented 11 months ago

If I had to guess, there's a pyproject.toml in some project, which is always installing backports.lzma even though it is only needed on Python 2 (and some fairly old Python 3.x versions). Ideally the pyproject.toml would conditionally (like 'backports.lzma; python_version<"3.3"'). Maybe worth asking that project if they would be open to this change?