Consider the case of a one-dimensional incompressible, non-viscous fluid flowing down a vertical pipe under the influence of gravity. Since we assume the flow is constant along the cross section of the pipe from the one dimensional assumption, let us denote the velocity of the fluid down the pipe to be $v$, with all other velocity components zero. Similarly, let us orient our axis such that the positive x axis points down the pipe. The Navier-Stokes equations in this case consist of three separate conservation equations — conservation of mass, momentum, and energy. Under the assumption of incompressibility, conservation of mass simply gives: \begin{equation} \tag{1} \frac{dv}{dx} = 0 . \end{equation} The momentum equation gives us the following equation: \begin{equation}\tag{2} \rho v \frac{dv}{dx} = -\frac{dp}{dx} + \rho g, \end{equation} where $\rho$ is the fluid density, $p$ the fluid pressure, and $g$ the gravitational acceleration. Finally, the energy equation relates the internal energy per unit mass, kinetic energy per unit mass, and the work done against pressure, and by the gravitational body force. We have the following relationship: \begin{equation}\tag{3} \rho v \frac{de}{dx} = -p \frac{dv}{dx}, \end{equation} where $e$ is the internal energy per unit mass of the fluid. This equation was obtained from the application of equation $(2.55)$, from this article to the present case assuming no viscosity, no thermal heat transfer, and no heat source.
Using the equation of state for an ideal gas, we have the following relationship between the internal energy of a gas and its temperature: $$ U = \frac{3}{2} NkT,$$ where we assumed the fluid to be a monoatomic gas, with number of molecules $N$, and temperature $T$. However, we also have the following relationship for an ideal gas: $$ p = \left(\frac{N}{V}\right)kT = nkT,$$ where $n$ is the number density of the fluid.
Now, the internal energy density per mass of the fluid $e$ can be written as: $$ e = \frac{U}{\rho V} = \frac{3}{2 \rho}nkT = \frac{3}{2} \frac{p}{\rho}.$$ Finally, under the assumption of incompressibility and equation $(1)$, equation $(2)$ simply becomes: \begin{equation}\tag{4} \frac{dp}{dx} = \rho g. \end{equation} Similarly, plugging in $e$ into equation $(3)$ and setting the right hand side to zero yields the following: \begin{equation}\tag{5} \frac{dp}{dx} = 0. \end{equation} It seems like these two equations for the pressure of the fluid are inconsistent. Yet, I can't find any assumption that is incorrect, which leads me to believe that the assumption of incompressibility is incorrect and it is not possible to have an incompressible fluid under a constant cross section with a body force acting on it. The fluid necessarily needs to be compressed.
However, I am unsure and I might have made a mistake in my assumption or have a flaw in my understanding. Would the system have been consistent if the fluid were compressible and why?