Seafile Server 7.1.4 for Raspberry Pi is ready! 23.05.2020

Then go for pip3 install pillow this will install Pillow for all the users.

I had already done that, of course, to begin with :slight_smile:

pip3 install pillow

Requirement already satisfied: pillow in /usr/local/lib/python3.6/site-packages (7.1.2)

You have something messed up, sorry.

Ok, I will try to do some more investigative work, thanks for helping!

Can you post the error you get starting seahub? the whole error pls.

Starting seahub at port 8000 ...
Traceback (most recent call last):
  File "/var/www/seafile/seafile-server-7.1.4/seahub/seahub/avatar/models.py", line 23, in <module>
    from PIL import Image
  File "/var/www/seafile/seafile-server-7.1.4/seahub/thirdpart/PIL/Image.py", line 93, in <module>
    from . import _imaging as core
ImportError: cannot import name '_imaging'



During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/var/www/seafile/seafile-server-7.1.4/seahub/thirdpart/bin/gunicorn", line 8, in <module>
    sys.exit(run())
  File "/var/www/seafile/seafile-server-7.1.4/seahub/thirdpart/gunicorn/app/wsgiapp.py", line 58, in run
    WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run()
  File "/var/www/seafile/seafile-server-7.1.4/seahub/thirdpart/gunicorn/app/base.py", line 228, in run
    super().run()
  File "/var/www/seafile/seafile-server-7.1.4/seahub/thirdpart/gunicorn/app/base.py", line 72, in run
    Arbiter(self).run()
  File "/var/www/seafile/seafile-server-7.1.4/seahub/thirdpart/gunicorn/arbiter.py", line 58, in __init__
    self.setup(app)
  File "/var/www/seafile/seafile-server-7.1.4/seahub/thirdpart/gunicorn/arbiter.py", line 118, in setup
    self.app.wsgi()
  File "/var/www/seafile/seafile-server-7.1.4/seahub/thirdpart/gunicorn/app/base.py", line 67, in wsgi
    self.callable = self.load()
  File "/var/www/seafile/seafile-server-7.1.4/seahub/thirdpart/gunicorn/app/wsgiapp.py", line 49, in load
    return self.load_wsgiapp()
  File "/var/www/seafile/seafile-server-7.1.4/seahub/thirdpart/gunicorn/app/wsgiapp.py", line 39, in load_wsgiapp
    return util.import_app(self.app_uri)
  File "/var/www/seafile/seafile-server-7.1.4/seahub/thirdpart/gunicorn/util.py", line 358, in import_app
    mod = importlib.import_module(module)
  File "/usr/lib/python3.5/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 986, in _gcd_import
  File "<frozen importlib._bootstrap>", line 969, in _find_and_load
  File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 665, in exec_module
  File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
  File "/var/www/seafile/seafile-server-7.1.4/seahub/seahub/wsgi.py", line 25, in <module>
    application = get_wsgi_application()
  File "/var/www/seafile/seafile-server-7.1.4/seahub/thirdpart/django/core/wsgi.py", line 13, in get_wsgi_application
    django.setup(set_prefix=False)
  File "/var/www/seafile/seafile-server-7.1.4/seahub/thirdpart/django/__init__.py", line 27, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/var/www/seafile/seafile-server-7.1.4/seahub/thirdpart/django/apps/registry.py", line 108, in populate
    app_config.import_models()
  File "/var/www/seafile/seafile-server-7.1.4/seahub/thirdpart/django/apps/config.py", line 202, in import_models
    self.models_module = import_module(models_module_name)
  File "/usr/lib/python3.5/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 986, in _gcd_import
  File "<frozen importlib._bootstrap>", line 969, in _find_and_load
  File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 665, in exec_module
  File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
  File "/var/www/seafile/seafile-server-7.1.4/seahub/seahub/avatar/models.py", line 26, in <module>
    import Image
ImportError: No module named 'Image'

Possible relations:

  • Do you have memcached?
  • make a ls -ltr for the /seahub/thirdpart directory
  • which rpi OS did you download?
  • which OS do you have?

You need python version 3.6 or upwards…

Yeaahh! good catch!

  • Do you have memcached ?
    Yes

  • make a ls -ltr for the /seahub/thirdpart directory

total 444
drwxr-xr-x  8 seafile seafile  4096 Dec 23 03:12 wsgidav
drwxr-xr-x  2 seafile seafile  4096 May 15 04:34 weworkapi
drwxr-xr-x  4 seafile seafile  4096 May 15 04:34 shibboleth
drwxr-xr-x  2 seafile seafile  4096 May 21 21:49 future-0.18.2.dist-info
drwxr-xr-x  2 seafile seafile  4096 May 21 21:49 Pillow-7.1.2.dist-info
drwxr-xr-x  2 seafile seafile  4096 May 21 21:49 django_post_office-3.3.0.dist-info
drwxr-xr-x  2 seafile seafile  4096 May 21 21:49 et_xmlfile-1.0.1.dist-info
drwxr-xr-x  2 seafile seafile  4096 May 21 21:49 openpyxl-2.6.4.dist-info
drwxr-xr-x  2 seafile seafile  4096 May 21 21:49 django_simple_captcha-0.5.12.dist-info
drwxr-xr-x  2 seafile seafile  4096 May 21 21:49 django_ranged_response-0.2.0.dist-info
drwxr-xr-x  2 seafile seafile  4096 May 21 21:49 pycryptodome-3.9.7.dist-info
drwxr-xr-x  2 seafile seafile  4096 May 24 13:37 pytz-2020.1.dist-info
drwxr-xr-x  4 seafile seafile  4096 May 24 13:37 pytz
drwxr-xr-x  2 seafile seafile  4096 May 24 13:37 Django-1.11.29.dist-info
drwxr-xr-x 19 seafile seafile  4096 May 24 13:37 django
drwxr-xr-x 10 seafile seafile  4096 May 24 13:37 future
drwxr-xr-x  7 seafile seafile  4096 May 24 13:37 past
drwxr-xr-x  4 seafile seafile  4096 May 24 13:37 libpasteurize
drwxr-xr-x  4 seafile seafile  4096 May 24 13:37 libfuturize
drwxr-xr-x  2 seafile seafile  4096 May 24 13:37 future-0.18.2-py3.6.egg-info
drwxr-xr-x  5 seafile seafile  4096 May 24 13:38 statici18n
drwxr-xr-x  2 seafile seafile  4096 May 24 13:38 six-1.15.0.dist-info
drwxr-xr-x  2 seafile seafile  4096 May 24 13:38 jsonfield2-3.0.3.dist-info
drwxr-xr-x  3 seafile seafile  4096 May 24 13:38 jsonfield
drwxr-xr-x  2 seafile seafile  4096 May 24 13:38 django_statici18n-1.9.0.dist-info
drwxr-xr-x  2 seafile seafile  4096 May 24 13:38 django_appconf-1.0.4.dist-infodrwxr-xr-x  2 seafile seafile  4096 May 24 13:38 captcha-0.3.dist-info
drwxr-xr-x  3 seafile seafile  4096 May 24 13:38 appconf
drwxr-xr-x  5 seafile seafile  4096 May 24 13:38 webpack_loader
drwxr-xr-x  9 seafile seafile  4096 May 24 13:38 post_office
drwxr-xr-x  2 seafile seafile  4096 May 24 13:38 django_webpack_loader-0.7.0.dist-info
drwxr-xr-x  2 seafile seafile  4096 May 24 13:38 django_post_office-3.3.0-py3.6.egg-info
drwxr-xr-x  2 seafile seafile  4096 May 24 13:38 setuptools-46.4.0.dist-info
drwxr-xr-x  6 seafile seafile  4096 May 24 13:38 setuptools
drwxr-xr-x  5 seafile seafile  4096 May 24 13:38 pkg_resources
drwxr-xr-x  2 seafile seafile  4096 May 24 13:38 gunicorn-20.0.4.dist-info
drwxr-xr-x  7 seafile seafile  4096 May 24 13:38 gunicorn
drwxr-xr-x  2 seafile seafile  4096 May 24 13:38 PyMySQL-0.9.3.dist-info
drwxr-xr-x  4 seafile seafile  4096 May 24 13:38 pymysql
drwxr-xr-x  3 seafile seafile  4096 May 24 13:38 picklefield
drwxr-xr-x  2 seafile seafile  4096 May 24 13:38 jdcal-1.4.1.dist-info
drwxr-xr-x  2 seafile seafile  4096 May 24 13:38 django_picklefield-2.1.1.dist-info
drwxr-xr-x  2 seafile seafile  4096 May 24 13:38 et_xmlfile-1.0.1-py3.6.egg-info
drwxr-xr-x  4 seafile seafile  4096 May 24 13:38 et_xmlfile
drwxr-xr-x 21 seafile seafile  4096 May 24 13:38 openpyxl
drwxr-xr-x  3 seafile seafile  4096 May 24 13:38 share
drwxr-xr-x  2 seafile seafile  4096 May 24 13:38 qrcode-6.1.dist-info
drwxr-xr-x  5 seafile seafile  4096 May 24 13:38 qrcode
drwxr-xr-x  2 seafile seafile  4096 May 24 13:38 openpyxl-3.0.3-py3.6.egg-info
drwxr-xr-x  6 seafile seafile  4096 May 24 13:38 formtools
drwxr-xr-x  2 seafile seafile  4096 May 24 13:38 django_formtools-2.2.dist-infodrwxr-xr-x  3 seafile seafile  4096 May 24 13:38 ranged_response
drwxr-xr-x  2 seafile seafile  4096 May 24 13:38 django_ranged_response-0.2.0-py3.6.egg-info
drwxr-xr-x  2 seafile seafile  4096 May 24 13:38 django_simple_captcha-0.5.12-py3.6.egg-info
drwxr-xr-x 12 seafile seafile  4096 May 24 13:38 captcha
drwxr-xr-x 11 seafile seafile  4096 May 24 13:38 rest_framework
drwxr-xr-x  2 seafile seafile  4096 May 24 13:38 djangorestframework-3.11.0.dist-info
drwxr-xr-x  2 seafile seafile  4096 May 24 13:38 python_dateutil-2.8.1.dist-info
drwxr-xr-x  6 seafile seafile  4096 May 24 13:38 dateutil
drwxr-xr-x  2 seafile seafile  4096 May 24 13:38 chardet-3.0.4.dist-info
drwxr-xr-x  4 seafile seafile  4096 May 24 13:38 chardet
drwxr-xr-x  3 seafile seafile  4096 May 24 13:38 certifi
drwxr-xr-x  2 seafile seafile  4096 May 24 13:38 urllib3-1.25.9.dist-info
drwxr-xr-x  6 seafile seafile  4096 May 24 13:38 urllib3
drwxr-xr-x  2 seafile seafile  4096 May 24 13:38 requests-2.23.0.dist-info
drwxr-xr-x  3 seafile seafile  4096 May 24 13:38 requests
drwxr-xr-x  2 seafile seafile  4096 May 24 13:38 idna-2.9.dist-info
drwxr-xr-x  3 seafile seafile  4096 May 24 13:38 idna
drwxr-xr-x  2 seafile seafile  4096 May 24 13:38 certifi-2020.4.5.1.dist-info
drwxr-xr-x  2 seafile seafile  4096 May 24 13:38 PyJWT-1.7.1.dist-info
drwxr-xr-x  4 seafile seafile  4096 May 24 13:38 jwt
drwxr-xr-x  3 seafile seafile  4096 May 24 13:38 bin
drwxr-xr-x 13 seafile seafile  4096 May 24 13:39 Crypto
drwxr-xr-x  2 seafile seafile  4096 May 24 13:40 pycryptodome-3.9.7-py3.6.egg-info
drwxr-xr-x  2 seafile seafile  4096 May 24 13:40 requests_oauthlib-1.3.0.dist-info
drwxr-xr-x  4 seafile seafile  4096 May 24 13:40 requests_oauthlib
drwxr-xr-x  2 seafile seafile  4096 May 24 13:40 oauthlib-3.1.0.dist-info
drwxr-xr-x  6 seafile seafile  4096 May 24 13:40 oauthlib
drwxr-xr-x  6 seafile seafile  4096 May 24 14:00 lxml
drwxr-xr-x  2 seafile seafile  4096 May 24 14:00 lxml-4.5.1-py3.6.egg-info
drwxr-xr-x  3 seafile seafile  4096 May 24 14:00 yaml
drwxr-xr-x  2 seafile seafile  4096 May 24 14:00 PyYAML-5.3.1-py3.6.egg-info
drwxr-xr-x  2 seafile seafile  4096 May 24 14:00 python_pam-1.8.4.dist-info
drwxr-xr-x  2 seafile seafile  4096 May 24 14:00 jsmin-2.2.2-py3.6.egg-info
drwxr-xr-x  3 seafile seafile  4096 May 24 14:00 jsmin
drwxr-xr-x  2 seafile seafile  4096 May 24 14:00 defusedxml-0.6.0.dist-info
drwxr-xr-x  3 seafile seafile  4096 May 24 14:00 defusedxml
drwxr-xr-x  4 seafile seafile  4096 May 24 23:50 seafobj
-rw-r--r--  1 seafile seafile 34159 May 24 23:54 six.py
-rw-r--r--  1 seafile seafile   126 May 24 23:54 easy_install.py
-rw-r--r--  1 seafile seafile 12462 May 24 23:54 jdcal.py
-rw-r--r--  1 seafile seafile   317 May 24 23:54 requirements.txt
-rw-r--r--  1 seafile seafile  7556 May 24 23:54 pam.py
drwxr-xr-x  2 seafile seafile  4096 May 31 17:29 __pycache__
drwxr-xr-x  8 seafile seafile  4096 May 31 17:31 registration
drwxr-xr-x  6 seafile seafile  4096 May 31 17:31 constance
drwxr-xr-x  7 seafile seafile  4096 May 31 17:31 termsandconditions
drwxr-xr-x  3 seafile seafile  4096 May 31 18:44 PIL
drwxr-xr-x  2 seafile seafile  4096 May 31 18:44 Pillow-7.1.2-py3.6.egg-info

@axstet already give you the hint :slight_smile: update your python

The infos are on the top of the thread.

I already have python 3.6

ls /usr/local/bin/
2to3-3.6         easy_install-3.6  keyring  pip2.7  pocketsphinx_batch         pydoc3.6   python3.6m         python3.7m-config  sphinx_cont_seg    sphinx_lm_eval
2to3-3.7         easy_install-3.7  pihole   pip3    pocketsphinx_continuous    pydoc3.7   python3.6m-config  pyvenv-3.6         sphinx_fe          sphinx_pitch
django-admin     idle3.6           pip      pip3.6  pocketsphinx_mdef_convert  pyjwt      python3.7          pyvenv-3.7         sphinx_jsgf2fsg    sqlformat
django-admin.py  idle3.7           pip2     pip3.7  __pycache__                python3.6  python3.7m         sphinx_cepview     sphinx_lm_convert  virtualenv

make a python -V and you will understand why

I understand that, that points to the default python 2.7, which I don’t think it would be smart to change if the OS assumes that to be v 2.7, no?

You don’t need to, but then you need to setup your seafile and seahub service to use your python >= 3.6 installation.

This is a friendly reminder. Please read the other notes on the top.

Like I said, I do have Python 3.6. What is not clear from the instruction above, sorry!, is then how to force Seafile to use the already available python3.6 executable.

I have read the link you provide, but it’s still unclear.

Should be ok to link python3 to python3.6 or python3.7. What is the output of python3 -V? If not > = 3.6, change link in /usr/bin/. Alternatively read about ‘systemd’ and ‘Environment’ or ‘EnvironmentFile’ option.

Hi,

I managed to fix the " ModuleNotFoundError: No module named ‘Image’ " error on Raspberry Pi OS Buster Lite by running the following command:

sudo apt install libtiff5

I ended up upgrading my OS to Ubuntu 18.04, which of course broke everything else running on my server, but at least now Seafile uses Python 3.6.
N.B.: Even after the OS upgrade, I had some import errors from seahub, due to missing packages, although I had installed them globally with pip3 prior. Therefore, I reinstalled them ‘locally’ to Seafile by running sudo -u seafile bash -c "pip3 install -U pillow django-pylibmc -t /var/www/seafile/seafile-server-latest/seahub/thirdpart", and that did the trick.