One needs to be careful with installing other python versions on a system and making them available system-wide. Upstream samba doesn't yet fully support python3, and the samba version shipped in ubuntu 16.04 most definitely does not support it either.
What's failing for you guys is this bit in postinst: # Automatically added by dh_python2: if which pycompile >/dev/null 2>&1; then pycompile -p python-samba fi Can you run pycompile? In a new xenial container where I installed python-samba, I can: root@xenial-samba-python-backtrace:~# pycompile -p python-samba root@xenial-samba-python-backtrace:~# ** Changed in: samba (Ubuntu) Status: Expired => Incomplete -- You received this bug notification because you are a member of Ubuntu Server, which is subscribed to samba in Ubuntu. https://bugs.launchpad.net/bugs/1651660 Title: package python-samba 2:4.3.11+dfsg-0ubuntu0.16.04.1 failed to install/upgrade: subprocess new pre-removal script returned error exit status 1 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/samba/+bug/1651660/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs