To install from PyPI, run pip install google-generativeai. Obtain an API key from AI Studio, then configure it here. Also, your import statement is wrong. You did import google.generative as genai but it should be import google.generativeai as genai. See PyPi.
https://stackoverflow.com/questions/77868611/modulenotfounderror-no-module-named-google-generative