One of the main problems that have to be solved during the development of hydrocarbon deposits is the formation of gas hydrates in pipelines. In this regard, the article presents a preventive method to struggle against the formation of gas hydrate deposits on the pipes inner walls associated with the supply of a hydrate formation inhibitor to the gas stream. The research was conducted on the basis of a mathematical model of the wet hydrocarbon gas flow in a horizontal pipeline. The research object is to determine the minimum required consumption of methanol, in which there is no formation of gas hydrate deposits on the channel inner walls. The practical significance of this study is that it is aimed at reducing the risks associated with the formation of gas hydrates in pipelines. The numerical implementation of a mathematical model of natural gas flow in a horizontal channel is based on a sequential solution of a system of four differential equations by the Runge-Kutta method of 4 orders of accuracy, followed by a search for sequential approximations of the minimum inhibitor flow rate, in which the "gas + water ↔ gas hydrate phase" transition process does not occur on the inner surface of the channel. The article presents a calculation of the proportion of a hydrate formation inhibitor in the liquid phase by solving a cubic equation using the Cardano method. Based on the computational experiments results, graphs were constructed and interpreted of the dependencies of the minimum inhibitor consumption on the soil temperature, inlet gas pressure, total water concentration in the gas flow, initial gas temperature and total gas flow rate.