You probably made a mistake here, and meant to write `from sympy.physics.pring import energy`, also you need to import `var`.