Pressure of a system at the thermodynamic equilibrium I'm reading a book in which it says that a system is at mechanical equilibrium if the pressure is constant in time but not necessarily uniform in space at any fixed point (for example it can be caused by the gravitational field). Given this definition of mechanical equilibrium, it is clear that you can't define an equilibrium pressure with a scalar; in general it is a stationary field: $p=p(\mathbf{x})$. But when the book draws a quasi-static process, it draws it with a well defined line, so implicitly it is considering pressure as a scalar at the equilibrium. This is a first point I'd like to clarify.
Second, it is also written that in a state of non equilibrium, the pressure is not defined for a system. I don't understand why, since fixed the time and a point it must be defined the pressure there. Of course the value of the pressure in this point will change in time but I can't get why you can never define it.
 A: In a fluid experiencing a non-quasistatic deformation, the state of stress in the fluid is described by a 2nd order tensor known as the stress tensor.  The stress tensor at a point in such a deformation is anisotropic (its components, the forces per unit area, are different in different directions).  Part of the stress tensor description is the pressure, which represents the isotropic part of the stress tensor; the remainder of the stress tensor is described by the (anisotropic) viscous stresses which depend not on the amount of deformation (like, for example, specific volume change), but rather by the rate at which the fluid is deforming.  In a quasi-static deformation, the viscous stresses vanish, so only the isotropic part of the stress tensor (the pressure) prevails.  So, with regard to your question about the pressure in a state of non-equilibrium, the pressure can certainly be determined from the specific volume and temperature at each location in the fluid (using the equation of state), but this does not fully capture the anisotropic state of stress in the fluid.
With regard to your first question, your book is assuming that gravitational effects are negligible, so that, for a quasi-statice process in such a situation, the pressure is spatially uniform.
A: So you are confusing many ideas here. Equilibrium is a tricky concept to define and in this case, it seems you have confused two different manifestations of it. 
Consider a gas. Pressure can be defined everywhere in it through momentum flows and such, call this the kinetic pressure function for now. Now what is an equilibrium state? Well it happens that over time, this kinetic pressure function reduces to a constant throughout the gas (assuming no external forces and such) and then stops changing. Let’s call these constant pressure states equilibrium states. From a thermodynamic point of view, we can define another quantity $P$ as the derivative of internal energy to volume when external parameters are held constant. Call this the thermodynamic pressure for now. It is equal to that constant kinetic pressure approaches. Now the line you are looking for for your second question is this: For non-equilibrium states, there exists a kinetic pressure but no well-defined thermodynamic pressure. For equilibrium states, the kinetic pressure reduces to a constant which happens to be equal to the associated thermodynamic pressure. This stems from the fact that thermodynamics has no way to deal with these non-equilibrium pressure gradients. It doesn’t know or care. It only understands this single constant present in equilibrium states and sometimes this is perhaps ill-phrased as pressure being undefined for non-equilbrium states.  
Now moving back to your first question of gravity. Well now, we need a stronger definition of equilibrium states because the kinetic pressure indeed does not reduce to a constant. Instead, it reduces to a linear function with known vertical gradient (namely $\rho g$). It's only characteristic value is say its value at the bottom of the container. For this system, my earlier statement about thermodynamic pressure completely falls apart. Changing volume at the top vs. bottom vs. sides all induce different changes in energy and hence various pressures to describe them reflective of the fact that we have a pressure gradient. This means our fundamental equation of state $dU=TdS-pdV$ has more parameters that need to be accounted for. Your book likely doesn't deal with such complex systems and uses the gravitational example as simply a side thought. When you look at processes, they likely look at the simple case of a regular gas in no gravitational field.
I know that was long but hopefully that answered your question!
