This just works around the problem, and will result in incomplete docs. The correct solution is to ensure that you have the application dependencies installed in the environment in which you build the docs (it's actually a subset of them - you probably just need to add the cryptography module).