Seafile-Server-7.1.5 on Rpi 3b+ buster No module named 'Image'

Hello!
I just installed seafile-server-7.1.5 on a raspberry pi 3b+ using the seafile-server-7.1.5-buster-armv7.tar.gz.
Everything went fine until I launched the seahub.sh start script but I get the error:
import Image
ModuleNotFoundError: No module named ‘Image’

I’ve seen that the error is well known and I tried to solve it following the indications on the rpi-repo issues58 but none of them worked

the Rpi is running Python 3.7.3 and pip 20.2.4

Do you have any advice?
Thank you very much!

@ddgg Have you tried setting to False in gunicorn.conf.py? Post exactly the whole error that you get.

hello jobenvil here we go:

LC_ALL is not set in ENV, set to en_US.UTF-8
Starting seahub at port 8000 ...
Traceback (most recent call last):
  File "/srv/haiwen/seafile-server-7.1.5/seahub/seahub/avatar/models.py", line 23, in <module>
    from PIL import Image
  File "/srv/haiwen/seafile-server-7.1.5/seahub/thirdpart/PIL/Image.py", line 94, in <module>
    from . import _imaging as core
ImportError: libopenjp2.so.7: cannot open shared object file: No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/srv/haiwen/seafile-server-7.1.5/seahub/thirdpart/bin/gunicorn", line 8, in <module>
    sys.exit(run())
  File "/srv/haiwen/seafile-server-7.1.5/seahub/thirdpart/gunicorn/app/wsgiapp.py", line 58, in run
    WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run()
  File "/srv/haiwen/seafile-server-7.1.5/seahub/thirdpart/gunicorn/app/base.py", line 228, in run
    super().run()
  File "/srv/haiwen/seafile-server-7.1.5/seahub/thirdpart/gunicorn/app/base.py", line 72, in run
    Arbiter(self).run()
  File "/srv/haiwen/seafile-server-7.1.5/seahub/thirdpart/gunicorn/arbiter.py", line 58, in __init__
    self.setup(app)
  File "/srv/haiwen/seafile-server-7.1.5/seahub/thirdpart/gunicorn/arbiter.py", line 118, in setup
    self.app.wsgi()
  File "/srv/haiwen/seafile-server-7.1.5/seahub/thirdpart/gunicorn/app/base.py", line 67, in wsgi
    self.callable = self.load()
  File "/srv/haiwen/seafile-server-7.1.5/seahub/thirdpart/gunicorn/app/wsgiapp.py", line 49, in load
    return self.load_wsgiapp()
  File "/srv/haiwen/seafile-server-7.1.5/seahub/thirdpart/gunicorn/app/wsgiapp.py", line 39, in load_wsgiapp
    return util.import_app(self.app_uri)
  File "/srv/haiwen/seafile-server-7.1.5/seahub/thirdpart/gunicorn/util.py", line 358, in import_app
    mod = importlib.import_module(module)
  File "/usr/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/srv/haiwen/seafile-server-7.1.5/seahub/seahub/wsgi.py", line 25, in <module>
    application = get_wsgi_application()
  File "/srv/haiwen/seafile-server-7.1.5/seahub/thirdpart/django/core/wsgi.py", line 13, in get_wsgi_application
    django.setup(set_prefix=False)
  File "/srv/haiwen/seafile-server-7.1.5/seahub/thirdpart/django/__init__.py", line 27, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/srv/haiwen/seafile-server-7.1.5/seahub/thirdpart/django/apps/registry.py", line 108, in populate
    app_config.import_models()
  File "/srv/haiwen/seafile-server-7.1.5/seahub/thirdpart/django/apps/config.py", line 202, in import_models
    self.models_module = import_module(models_module_name)
  File "/usr/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/srv/haiwen/seafile-server-7.1.5/seahub/seahub/avatar/models.py", line 26, in <module>
    import Image
ModuleNotFoundError: No module named 'Image'
Error:Seahub failed to start.
Please try to run "./seahub.sh start" again

thank you!

try this

pip3 install -U Pillow -t /media/sda/seafile/seafile-server-latest/seahub/thirdpart

changing the path to your /seahub/thirdpart directory

Try to install as well libopenjp2-7 and libopenjp2-7-dev , they are needed for Pillow in buster

with apt install libopenjp2-7 libopenjp2-7-dev

ok, I followed your advices, and it still didin’t work. Then I said; “ok let me import Image directly from a python” and from there I realized that libtiff5 was missing!

sudo apt install libtiff5 libtiff5-dev
and the problem is solved!

I’m having others though, but I’d rather start a new topic if I need to look for help. Thank you very much for pointing me in the right direction.

You installed Seafile for first time, right? because you were missing basically libraries. These shared libaries are asked when you try to build Pillow. Now you are good to go and don’t need anymore.