In recent years, the spin Hall effect has been received great attention because of its potential application in spintronics and quantum information processing and storage. However, this effect is usually studied under the external homogeneous electric field. Understanding how the inhomogeneous electric field affects the spin Hall effect is still lacking. Here, we give the general expression for the intrinsic spin Hall conductivity in the presence of the inhomogeneous electric field, which is shown to be expressed through gauge-invariant geometric quantities. On the other hand, when people get physical intuition on transport phenomena from the wave packet, one issue appears. It is shown that the conductivity obtained from the conventional wave packet approach cannot be fully consistent with the one predicted by the Kubo-Greenwood formula. Here, we attempt to solve this problem.