How i can initialize gravity in the class ShowBase?

Tell us something more about what are you doing, which physics module are you using.

NOne . I don’t know which to use.

ShowBase has nothing to do with gravity. By default, you don’t have any physics in your application, and thus no gravity. I strongly suggest you study the Bullet section in the Panda manual. You may also take a look at the ODE section, but Bullet is known to be superior, as far as games are concerned.

You probably don’t need physics, and I wouldn’t advise adding in physics really early on in the game. You can implement gravity using simple formulas, or using the gravity collision handlers that Panda provides.