I did setup build and then install and sees fine (import wx gives no error)
try very basic program and t fails. The code is from wiki. Have name changed? Here is error I get
Traceback (most recent call last):
File “wx.py”, line 1, in
import wx
File “/home/stefano/wx.py”, line 8, in
class HtmlWindow(wx.HtmlWindow):
AttributeError: ‘module’ object has no attribute ‘HtmlWindow’
stefano@hosannahighertech:~$ python3 wx.py
Traceback (most recent call last):
File “wx.py”, line 1, in
import wx
File “/home/stefano/wx.py”, line 4, in
class AboutBox(wx.Dialog):
AttributeError: ‘module’ object has no attribute ‘Dialog’
I use Python3 and I though I wold brush again my PySkillz with my lovely toolkit!
TIA,
Stefno
It is not a good idea to name your files after a library.
Your traceback says you are running a file called wx,py. Use any other name and try again,
wx.Dialog works perfect on py3k
J
···
On Tuesday, July 30, 2013 11:37:51 PM UTC+2, Stefano Mtangoo wrote:
I did setup build and then install and sees fine (import wx gives no error)
try very basic program and t fails. The code is from wiki. Have name changed? Here is error I get
Traceback (most recent call last):
File “wx.py”, line 1, in
import wx
File “/home/stefano/wx.py”, line 8, in
class HtmlWindow(wx.HtmlWindow):
AttributeError: ‘module’ object has no attribute ‘HtmlWindow’
stefano@hosannahighertech:~$ python3 wx.py
Traceback (most recent call last):
File “wx.py”, line 1, in
import wx
File “/home/stefano/wx.py”, line 4, in
class AboutBox(wx.Dialog):
AttributeError: ‘module’ object has no attribute ‘Dialog’
I use Python3 and I though I wold brush again my PySkillz with my lovely toolkit!
TIA,
Stefno
It is not a good idea to name your files after a library.
Your traceback says you are running a file called wx,py. Use any other name and try again,
wx.Dialog works perfect on py3k
J
I believe its more than that. I have tried as simple example as
#!/usr/bin/env python
import wx
class MyFrame(wx.Frame):
""" We simply derive a new class of Frame. """
def __init__(self, parent, title):
wx.Frame.__init__(self, parent, title=title, size=(200,100))
self.control = wx.TextCtrl(self, style=wx.TE_MULTILINE)
self.Show(True)
app = wx.App(False)
frame = MyFrame(None, 'Small editor')
app.MainLoop()
And all I get is
Traceback (most recent call last):
File “test.py”, line 2, in
import wx
File “/usr/local/lib/python3.3/dist-packages/wx/init.py”, line 17, in
from wx.core import *
File “/usr/local/lib/python3.3/dist-packages/wx/core.py”, line 6, in
from ._core import *
ImportError: No module named ‘wx._core’
Am not sure what is that module and why its not there since I did install the build
BR/
Stefano
···
On Wednesday, July 31, 2013 7:39:18 PM UTC+3, Joaquin Abian wrote:
On Tuesday, July 30, 2013 11:37:51 PM UTC+2, Stefano Mtangoo wrote:
I did setup build and then install and sees fine (import wx gives no error)
try very basic program and t fails. The code is from wiki. Have name changed? Here is error I get
Traceback (most recent call last):
File “wx.py”, line 1, in
import wx
File “/home/stefano/wx.py”, line 8, in
class HtmlWindow(wx.HtmlWindow):
AttributeError: ‘module’ object has no attribute ‘HtmlWindow’
stefano@hosannahighertech:~$ python3 wx.py
Traceback (most recent call last):
File “wx.py”, line 1, in
import wx
File “/home/stefano/wx.py”, line 4, in
class AboutBox(wx.Dialog):
AttributeError: ‘module’ object has no attribute ‘Dialog’
I use Python3 and I though I wold brush again my PySkillz with my lovely toolkit!
TIA,
Stefno
It is not a good idea to name your files after a library.
Your traceback says you are running a file called wx,py. Use any
other name and try again,
wx.Dialog works perfect on py3k
J
I believe its more than that. I have tried as simple example as
#!/usr/bin/env python
import wx
class MyFrame(wx.Frame):
""" We simply derive a new class of Frame. """
def __init__(self, parent, title):
wx.Frame.__init__(self, parent, title=title, size=(200,100))
self.control = wx.TextCtrl(self, style=wx.TE_MULTILINE)
self.Show(True)
Traceback (most recent call last):
File "test.py", line 2, in <module>
import wx
File "/usr/local/lib/python3.3/dist-packages/wx/__init__.py", line 17,
in <module>
from wx.core import *
File "/usr/local/lib/python3.3/dist-packages/wx/core.py", line 6, in
<module>
from ._core import *
ImportError: No module named 'wx._core'
Am not sure what is that module and why its not there since I did
install the build
The build should have created a _core.so file in the wx folder. Is it there in the build tree and just didn't get installed? Or is it missing there too?
···
On Wednesday, July 31, 2013 7:39:18 PM UTC+3, Joaquin Abian wrote:
file is there under wx. I just do not know why the error.
How am I suppose to install it? may be there is where I err?
···
On 05/08/2013 07:16 alasiri, Robin Dunn
wrote:
Stefano
Mtangoo wrote:
On Wednesday, July 31, 2013 7:39:18 PM UTC+3, Joaquin Abian
wrote:
It is not a good idea to name your files after a library.
Your traceback says you are running a file called wx,py. Use
any
other name and try again,
wx.Dialog works perfect on py3k
J
I believe its more than that. I have tried as simple example as
#!/usr/bin/env python
import wx
class MyFrame(wx.Frame):
""" We simply derive a new class of Frame. """
def __init__(self, parent, title):
wx.Frame.__init__(self, parent, title=title,
size=(200,100))
self.control = wx.TextCtrl(self,
style=wx.TE_MULTILINE)
self.Show(True)
app = wx.App(False)
frame = MyFrame(None, 'Small editor')
app.MainLoop()
And all I get is
Traceback (most recent call last):
File "test.py", line 2, in <module>
import wx
File "/usr/local/lib/python3.3/dist-packages/wx/__init__.py",
line 17,
in <module>
from wx.core import *
File "/usr/local/lib/python3.3/dist-packages/wx/core.py", line
6, in
<module>
from ._core import *
ImportError: No module named 'wx._core'
Am not sure what is that module and why its not there since I
did
install the build
The build should have created a _core.so file in the wx folder.
Is it there in the build tree and just didn’t get installed? Or
is it missing there too?
–
Stefano D. Mtangoo
Mob: +255 754710410
Twitter: @mtangoo
Web. Linkedin:
It is not a good idea to name your files after a library.
Your traceback says you are running a file called wx,py. Use any
other name and try again,
wx.Dialog works perfect on py3k
J
I believe its more than that. I have tried as simple example as
#!/usr/bin/env python
import wx
class MyFrame(wx.Frame):
""" We simply derive a new class of Frame. """
def __init__(self, parent, title):
wx.Frame.__init__(self, parent, title=title, size=(200,100))
self.control = wx.TextCtrl(self, style=wx.TE_MULTILINE)
self.Show(True)
Traceback (most recent call last):
File "test.py", line 2, in <module>
import wx
File "/usr/local/lib/python3.3/dist-packages/wx/__init__.py", line 17,
in <module>
from wx.core import *
File "/usr/local/lib/python3.3/dist-packages/wx/core.py", line 6, in
<module>
from ._core import *
ImportError: No module named 'wx._core'
Am not sure what is that module and why its not there since I did
install the build
The build should have created a _core.so file in the wx folder. Is it
there in the build tree and just didn't get installed? Or is it
missing there too?
file is there under wx. I just do not know why the error.
How am I suppose to install it? may be there is where I err?
That depends somewhat on how you did the build, but you should just need to use the install command on the build.py command-line. Run build.py --help for more details on available commands. There are some things that will be delegated to setup.py (and vice-versa) but that should all be hidden from you unless something has broken. You can also run directly from the build folder without installing by adding the Phoenix folder to the PYTHONPATH.
···
On 05/08/2013 07:16 alasiri, Robin Dunn wrote:
On Wednesday, July 31, 2013 7:39:18 PM UTC+3, Joaquin Abian wrote:
I do two stage first:
python3 setup.py build
then
sudo python3 setup.py install
Is there anything else I need to do? I don’t want to run wx from
that directory.
Anyone else experiencing this problem?
···
Hi Robin,
On 06/08/2013 04:34 asubuhi, Robin Dunn wrote:
Stefano
D. Mtangoo wrote:
On 05/08/2013 07:16 alasiri, Robin Dunn
wrote:
Stefano Mtangoo wrote:
On Wednesday, July 31, 2013 7:39:18 PM UTC+3, Joaquin Abian
wrote:
It is not a good idea to name your files after a library.
Your traceback says you are running a file called wx,py. Use
any
other name and try again,
wx.Dialog works perfect on py3k
J
I believe its more than that. I have tried as simple example
as
#!/usr/bin/env python
import wx
class MyFrame(wx.Frame):
""" We simply derive a new class of Frame. """
def __init__(self, parent, title):
wx.Frame.__init__(self, parent, title=title, size=(200,100))
self.control = wx.TextCtrl(self, style=wx.TE_MULTILINE)
self.Show(True)
app = wx.App(False)
frame = MyFrame(None, 'Small editor')
app.MainLoop()
And all I get is
Traceback (most recent call last):
File "test.py", line 2, in <module>
import wx
File
“/usr/local/lib/python3.3/dist-packages/wx/init.py”,
line 17,
in <module>
from wx.core import *
File "/usr/local/lib/python3.3/dist-packages/wx/core.py",
line 6, in
<module>
from ._core import *
ImportError: No module named 'wx._core'
Am not sure what is that module and why its not there since
I did
install the build
The build should have created a _core.so file in the wx
folder. Is it
there in the build tree and just didn't get installed? Or is
it
missing there too?
file is there under wx. I just do not know why the error.
How am I suppose to install it? may be there is where I err?
That depends somewhat on how you did the build, but you should
just need to use the install command on the build.py
command-line. Run build.py --help for more details on available
commands. There are some things that will be delegated to
setup.py (and vice-versa) but that should all be hidden from you
unless something has broken. You can also run directly from the
build folder without installing by adding the Phoenix folder to
the PYTHONPATH.
–
Stefano D. Mtangoo
Mob: +255 754710410
Twitter: @mtangoo
Web. Linkedin: