AttributeError: module 'wx' has no attribute 'App'

Hello, I am new to python and consequently in wxpython I am trying to run the code of hello world then having the error that I described at the top. I thank you if you can help me.

Traceback (most recent call last): File “/home/nilton/exercicios/wx.py”, line 2, in import wx File “/home/nilton/exercicios/wx.py”, line 5, in app = wx.App() AttributeError: module ‘wx’ has no attribute ‘App’

The file /home/nilton/exercicios/wx.py is being imported when you do import wx, so the wxPython package is not found. Change your module name.

1 Like

thank you I’ll try later I send the result