We examine the influence of the environment on the chemical abundances of late-type galaxies with masses of 10^9.1 M_sun - 10^11 M_sun using data from the Sloan Digital Sky Survey(SDSS). We find that the environmental influence on galactic chemical abundances is strongest for galaxies with masses of 10^9.1 M_sun to 10^9.6 Msun. The galaxies in the densest environments may exceed the average oxygen abundances by about 0.05 dex (the median value of the overabundances for 101 galaxies in the densest environments) and show higher abundances in nitrogen by about 0.1. The abundance excess decreases with increasing galaxy mass and with decreasing environmental density. Since only a small fraction of late-type galaxies is located in high-density environments these galaxies do not have a significant influence on the general X/H - M relation. The metallicity - mass relations for isolated galaxies and for galaxies with neighbors are very similar. The mean shift of non-isolated galaxies around the metallicity - mass relation traced by the isolated galaxies is less than 0.01 dex for oxygen and less than 0.02 dex for nitrogen. The scatter in the galactic chemical abundances is large for any number of neighbor galaxies (at any environmental density), i.e., galaxies with both enhanced and reduced abundances can be found at any environmental density. This suggests that environmental effects do not play a key role in evolution of late-type galaxies as was also concluded in some of the previous studies.