Skip to content
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

Unable to complete installation on Raspbian ARM #634

Closed
abenedetti1968 opened this issue Dec 5, 2023 · 33 comments · Fixed by #746
Closed

Unable to complete installation on Raspbian ARM #634

abenedetti1968 opened this issue Dec 5, 2023 · 33 comments · Fixed by #746
Labels
ARM Linux Linux OS

Comments

@abenedetti1968
Copy link

Unable to complete installation on Raspberry running Raspbian:

system hangs after following commands:

pi@raspberrypi:~/kcc $ sudo python3.8 -m pip install -r 'requirements.txt'
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting PyQt5>=5.6.0
Using cached PyQt5-5.15.10.tar.gz (3.2 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... -

Many thanks.

@axu2

This comment was marked as outdated.

@abenedetti1968

This comment was marked as outdated.

@axu2

This comment was marked as outdated.

@axu2 axu2 added the Linux Linux OS label Dec 5, 2023
@abenedetti1968

This comment was marked as outdated.

@abenedetti1968

This comment was marked as outdated.

@abenedetti1968
Copy link
Author

Trying with flatpak.
Could you please carify where is:
NOTE: Please put kindlegen_linux_i386 to ~/.var/app/io.github.ciromattia.kcc/data/kindlegen

@axu2
Copy link
Collaborator

axu2 commented Dec 5, 2023

@abenedetti1968 Does the flatpak version run?

Amazon no longer offers Kindlegen Linux, if you want to use it you'll need to find an archive of it somewhere. You need kindlegen to generate files for modern kindles.

@winstonma
Copy link

winstonma commented Dec 5, 2023

@axu2 The latest flatpak version doesn't work for me (#636 for more info). I have to install the previous version.

@abenedetti1968 I would suggest you could install the previous KCC flatpak version to verify first

$ flatpak install flathub io.github.ciromattia.kcc
$ sudo flatpak update --commit=199be7911bc102208f052391fbe3d1aad2749294195c6be440ba4ca17580cb5a io.github.ciromattia.kcc
$ flatpak run io.github.ciromattia.kcc

KCC will run even kindlegen is not placed. As long as you can open KCC you can place kindlegen later on and do comic conversion.

@abenedetti1968

This comment has been minimized.

@winstonma

This comment has been minimized.

@winstonma

This comment has been minimized.

@abenedetti1968

This comment has been minimized.

@winstonma

This comment has been minimized.

@abenedetti1968

This comment has been minimized.

@winstonma
Copy link

@abenedetti1968 I tried to find kindlegen on some other github repo and I can only find x86 version. I really can't find the arm64 version.

@AcidWeb
Copy link
Collaborator

AcidWeb commented Dec 6, 2023

Because it don't exist.

@axu2 axu2 changed the title Unable to complete installation on Raspbian Unable to complete installation on Raspbian ARM Dec 6, 2023
@axu2 axu2 added the ARM label Dec 6, 2023
@darodi
Copy link
Collaborator

darodi commented Dec 8, 2023

@abenedetti1968 @winstonma @AcidWeb

I use KCC with my raspberry and my NAS, even in armv7.

  • mozjpeg-lossless-optimization is present in the docker version of KCC built for arm
    it should work in command line, if not broken recently
  • you don't need a kindlegen arm64 version, if you use qemu like in the flatpak version
    but it will be slow...

https://github.com/flathub/io.github.ciromattia.kcc/blob/1f22ad93ea58341dacd496201bd18ac7e73f5b5e/io.github.ciromattia.kcc.yml#L59-L62

@winstonma
Copy link

winstonma commented Dec 9, 2023

Yeah @darodi qemu would work but this is some advanced skill 🤔

Simple flatpak install would get you nowhere

@pjft
Copy link

pjft commented Sep 25, 2024

I'll bring this up again if possible, as I am being forced to remove all these apps from the laptop I've been using and would like to use the cli version on my Raspberry Pi 5, 64-bit OS.

The docker versions do not work at all - they always complain of missing dependencies, unfortunately, and I tried multiple versions.

On the source version, I compiled mozjpeg-lossless-optimization and installed it in a venv, but I'm missing kindlegen to convert to MOBI.

Any further thoughts or pointers, I'd be happy to explore.

@axu2

This comment has been minimized.

@pjft
Copy link

pjft commented Sep 25, 2024

Thanks for the reply.

With the last version I get:

Traceback (most recent call last):
  File "/opt/kcc/kcc-c2e.py", line 28, in <module>
    from kindlecomicconverter.startup import startC2E
  File "/opt/kcc/kindlecomicconverter/startup.py", line 24, in <module>
    from .shared import dependencyCheck
  File "/opt/kcc/kindlecomicconverter/shared.py", line 25, in <module>
    from packaging.version import Version
ModuleNotFoundError: No module named 'packaging'

Basically if I log into the shell and type pip list there's little there other than two modules.

root@85b3e6065d5f:/app# pip list
Package    Version
---------- -------
pip        23.1.2
setuptools 65.5.0

On 5.6.5, I get a different error, but pip list returns the same.

ERROR: psutil 5.0.0+, python-slugify 1.2.1+, Pillow 5.2.0+ is not installed!

Still, I have a workaround for the command-line version based on a set of things I ended up finding on here and the internet.

I needed to:

  • Create a python virtual env on my KCC folder
python3 -m venv <kcc's folder>
  • Compile from source mozjpeg-lossless-optimization , per the instructions:
git clone https://github.com/wanadev/mozjpeg-lossless-optimization.git
cd mozjpeg-lossless-optimization
git submodule init
git submodule update
  • Install it in the virtual environment
sudo <kcc's folder>/bin/python3 setup.py install
  • Install the remaining required packages there
cd <kcc's folder>
bin/pip3 install -r 'requirements.txt' 
  • Download and decompress Kindlegen
wget https://archive.org/download/kindlegen_linux_2_6_i386_v2_9/kindlegen_linux_2.6_i386_v2_9.tar.gz
tar xvzf kindlegen_linux_2.6_i386_v2_9.tar.gz 
  • Install qemu-user-static
sudo apt-get install qemu-user-static
  • Change KCC's comic2ebook.py for the kindlegen calls to have subprocess_run(['qemu-i386-static', '<kcc folder>/kindlegen' instead of just subprocess_run(['kindlegen'

So far, it's working surprisingly awesomely, so thank you - it pains me to have to leave the GUI behind, but at least I keep using KCC :)

Happy to detail further the steps if it's helpful here.

@axu2

This comment has been minimized.

@pjft

This comment has been minimized.

@pjft

This comment has been minimized.

@axu2

This comment has been minimized.

@pjft

This comment has been minimized.

@axu2

This comment has been minimized.

@axu2 axu2 reopened this Sep 28, 2024
@pjft

This comment has been minimized.

@axu2
Copy link
Collaborator

axu2 commented Sep 29, 2024

@pjft made an additional change to match amd64 behavior, hopefully it works now on arm64.

Please redownload latest docker image

@pjft
Copy link

pjft commented Sep 29, 2024

@axu2 yes, it finally does - well done! I can confirm that it now works.

Thank you! You may at least now keep a reference that v6.2.0 works.

I added some lines on the installation instructions regarding accessing local and relative paths using the Docker version as it's harder than the command line.

Awesome work. You may close this now I believe.

@axu2
Copy link
Collaborator

axu2 commented Sep 29, 2024

Excellent, thanks for confirming. I'll do something similar for armv7.

@abenedetti1968

@axu2 axu2 closed this as completed in #746 Sep 29, 2024
@axu2
Copy link
Collaborator

axu2 commented Sep 30, 2024

@pjft does the gui version work on docker arm64? kcc.py is the entry point.

@pjft
Copy link

pjft commented Sep 30, 2024

@axu2 I apologize, but that I cannot comment on that part with a lot of confidence. My headless server runs a GUI-less version of the OS, I only have access to it via SSH and terminal. I'd have to defer to someone else, unfortunately, at least for the time being.

I tried to bash into the container, navigate into /opt/kcc and run python3 kcc.pyand I got the following error:

ERROR: PySide 6.5.1+ is not installed!

So I'm assuming it isn't working? I expected a Qt6 error or something related to not being able to access the display.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ARM Linux Linux OS
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants