解决办法是:
sudo cp /usr/lib/python3.5/lib-dynload/_gdbm.cpython-35m-x86_64-linux-gnu.so /usr/lib/python3.6/lib/python3.6/lib-dynload/_gdbm.cpython-36m-x86_64-linux-gnu.so