Your matrix 'X' has 7 rows, but 'b' has just 1 row. Therefore, it's giving incompatible dimension error. You need to reshape the variable 'b' to use hstack(). Also, the output will be a COO matrix instead of CSR matrix. You need to convert COO to CSR matrix.
Try the following code to add 'b' as a new column to 'X'.
>>> X = hstack((X,np.reshape(b,(len(b),1))))
>>> X
<7x6 sparse matrix of type '<class 'numpy.int32'>'
with 16 stored elements in COOrdinate format>
>>> type(X)
<class 'scipy.sparse.coo.coo_matrix'>
>>> X=csr_matrix(X)
>>> type(X)
<class 'scipy.sparse.csr.csr_matrix'>
>>> X.toarray()
array([[0, 0, 0, 0, 1, 1],
[0, 2, 0, 0, 0, 2],
[0, 0, 0, 3, 0, 3],
[4, 0, 0, 0, 0, 4],
[0, 0, 5, 0, 6, 5],
[0, 0, 7, 0, 0, 6],
[0, 8, 0, 9, 0, 7]], dtype=int32)