The inverse (and generalized inverse) of a sparse matrix is usually dense, unless you can permute the rows and columns of the matrix so that it becomes block diagonal.
So your problem splits into two parts: (i) find a permutation that makes it block-diagonal, and (ii) compute the generalized inverse using linalg.pinv separately for each block. If your matrix is small enough, just converting it to a dense matrix first and then computing the pseudoinverse is also efficient.
If you on the other hand want to compute something like "A^{-1} x", using gmres or some other iterative routine may be a more efficient solution.