Setup-seafile-mysql.sh fails : python module pymysql not found

My fancy setup

I’m installing Seafile server 8.0.7 for Raspberry Pi on a new RPI 4b with Ubuntu (server) 20.04.3 installed on a USB attached SSD drive (No SD card in use).

OS setup

To install Ubuntu 20.04.3 I followed these instructions https://www.instructables.com/Raspberry-Pi-4-USB-Boot-No-SD-Card/ … I was lazy and simply used the pre-built images provided there.

The OS is up and running super fine. Fresh install, but just for reference:

ubuntu@ubuntu:/srv/seafile$ python3 --version
Python 3.8.10
ubuntu@ubuntu:/srv/seafile$ uname -a
Linux ubuntu 5.4.0-1042-raspi #46-Ubuntu SMP PREEMPT Fri Jul 30 00:35:40 UTC 2021 aarch64 aarch64 aarch64 GNU/Linux
ubuntu@ubuntu:/srv/seafile$ mysql --version
mysql Ver 15.1 Distrib 10.3.31-MariaDB, for debian-linux-gnu (aarch64) using readline 5.2

Seafile server

I have downloaded the Raspberry Pi seafile server software version ‘focal arm64v8’ from here: https://github.com/haiwen/seafile-rpi/releases/download/v8.0.7/seafile-server-8.0.7-focal-arm64v8.tar.gz

I followed the instructions provided here: https://computingforgeeks.com/how-to-install-seafile-server-on-ubuntu-linux/

MySQL server is up and running super fine.

Installation fail

I’m at the stage where seafile server is unpacked in /srv/seafile but running: sudo ./setup-seafile-mysql.sh fails:

Checking python on this machine …

Traceback (most recent call last):
File “setup-seafile-mysql.py”, line 19, in
import pymysql
ModuleNotFoundError: No module named ‘pymysql’

I have confirmed that the following packages are installed and latest version:

  • libpython3.8
  • ffmpeg
  • python3-requests
  • python3-memcache
  • python3-mysqldb
  • python3-setuptools
  • python3-urllib3
  • python3-ldap
  • python3-pil
  • python3-pip

I’ll answer my own question here for future reference:

also install (apt): python3-pymysql

2 Likes