The likely problem here is that there is that [ -e /content ] returns false, so it doesn’t run pip install -Uqq fastbook because of the && conditional (it will only run the pip install if [ -e /content ] is truthy). Instead, try running just the following:
! pip install -Uqq fastbook
And see if that resolves your issue.
I found this forum post which explains this in more detail.