Discussion:
Phoenix snapshots builds, can't import
a***@gmail.com
2014-02-13 13:14:43 UTC
Permalink
Hi list. I seems to have built and installed a snapshot build of phoenix
(wxPython_Phoenix-3.0.1.dev75841) without any errors that I noticed. When I
fire up python (3.3) and import wx, I get the following error:

Python 3.3.2 (default, Dec 26 2013, 15:57:09)
[GCC 4.5.4] on linux
Type "help", "copyright", "credits" or "license" for more information.
import wx
File "<stdin>", line 1, in <module>
File "/usr/lib/python3.3/site-packages/wx/__init__.py", line 17, in
<module>
from wx.core import *
File "/usr/lib/python3.3/site-packages/wx/core.py", line 6, in <module>
from ._core import *
ImportError: dynamic module does not define init function (PyInit_siplib)
I'm sure I must have missed something simple, this seems far too basic an
error to be anything subtle.

Mike
--
You received this message because you are subscribed to the Google Groups "wxPython-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wxPython-dev+***@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
David Lawler
2014-02-14 19:02:25 UTC
Permalink
Post by a***@gmail.com
Hi list. I seems to have built and installed a snapshot build of phoenix
(wxPython_Phoenix-3.0.1.dev75841) without any errors that I noticed. When I
fire up python (3.3) and import wx, I get the following error:Python 3.3.2
(default, Dec 26 2013, 15:57:09) [GCC 4.5.4] on linuxType "help",
"copyright", "credits" or "license" for more information.>>> import
wxTraceback (most recent call last):  File "<stdin>", line 1, in <module> 
File "/usr/lib/python3.3/site-packages/wx/__init__.py", line 17, in
<module>    from wx.core import *  File "/usr/lib/python3.3/site-
packages/wx/core.py", line 6, in <module>    from ._core import
*ImportError: dynamic module does not define init function
(PyInit_siplib)>>>
Post by a***@gmail.com
I'm sure I must have missed something simple, this seems far too basic an
error to be anything subtle.Mike
I too have this issue on Linux Mint. I was so happy when I got Phoenix to
build (ia32libs issue), and then I got the exact same problem. If I start
python3 while in the Phoenix directory (in which the wx directory is
contained), import wx does work. It has to be something that is not being
installed, the wrong library getting loaded or a path thing, I just don't
know how to run through the possibilities.

Sorry,

David
--
You received this message because you are subscribed to the Google Groups "wxPython-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wxPython-dev+***@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Robin Dunn
2014-02-16 01:26:54 UTC
Permalink
Post by a***@gmail.com
Hi list. I seems to have built and installed a snapshot build of phoenix
(wxPython_Phoenix-3.0.1.dev75841) without any errors that I noticed.
What build command(s) did you use?
Post by a***@gmail.com
Python 3.3.2 (default, Dec 26 2013, 15:57:09)
[GCC 4.5.4] on linux
Type "help", "copyright", "credits" or "license" for more information.
Post by a***@gmail.com
import wx
File "<stdin>", line 1, in <module>
File "/usr/lib/python3.3/site-packages/wx/__init__.py", line 17, in
<module>
from wx.core import *
File "/usr/lib/python3.3/site-packages/wx/core.py", line 6, in <module>
from ._core import *
ImportError: dynamic module does not define init function
(PyInit_siplib)
I'm sure I must have missed something simple, this seems far too basic
an error to be anything subtle.
Let's see if we can figure out if it was a build problem or an install
problem. So first remove everything from
/usr/lib/python3.3/site-packages/wx, and then verify that there is no
other wx by running:

python3.3 -c "import wx; print(wx.version())"

You should get an ImportError. Next, try to use Phoenix from the build
folder and see if it works:

cd /path/to/your/Phoenix
PYTHONPATH=$PWD python3.3 samples/simple/hello.py

Then report back the results.
--
Robin Dunn
Software Craftsman
http://wxPython.org
--
You received this message because you are subscribed to the Google Groups "wxPython-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wxPython-dev+***@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Vadim Markovtsev
2014-03-14 11:32:04 UTC
Permalink
I had the same issue, too, on Ubuntu 13.10.

There seems to be an installation bug. First of all, here is how I build
and install Phoenix:

wget http://wxpython.org/Phoenix/snapshot-builds/wxPython_Phoenix-3.0.1.dev76120.tar.gz
sudo apt-get install libglu1-mesa-dev libgstreamer-plugins-base0.10-dev
libgconf2-dev libgtk-3-dev libgtk2.0-dev libwebkit-dev
sudo pip3 install wxPython_Phoenix-3.0.1.dev76120.tar.gz

Everything seems to go normal, and I end up with the following installed
files:

cd /usr/local/lib/python3.3/dist-packages && ls wx

adv.pi _glcanvas.so lib
libwx_gtk2u_adv-3.0.so.0 libwx_gtk2u_html-3.0.so
libwx_gtk2u_ribbon-3.0.so.0.1.0 libwx_gtk2u_xrc-3.0.so.0 _stc.so
adv.py grid.pi libwx_baseu-3.0.so
libwx_gtk2u_adv-3.0.so.0.1.0 libwx_gtk2u_html-3.0.so.0
libwx_gtk2u_richtext-3.0.so libwx_gtk2u_xrc-3.0.so.0.1.0 tools
_adv.so grid.py libwx_baseu-3.0.so.0
libwx_gtk2u_aui-3.0.so libwx_gtk2u_html-3.0.so.0.1.0
libwx_gtk2u_richtext-3.0.so.0 py
__version__.py
core.pi _grid.so libwx_baseu-3.0.so.0.1.0
libwx_gtk2u_aui-3.0.so.0 libwx_gtk2u_media-3.0.so
libwx_gtk2u_richtext-3.0.so.0.1.0 __pycache__ webkit.pi
core.py html2.pi libwx_baseu_net-3.0.so
libwx_gtk2u_aui-3.0.so.0.1.0 libwx_gtk2u_media-3.0.so.0
libwx_gtk2u_stc-3.0.so richtext.pi webkit.py
_core.so html2.py libwx_baseu_net-3.0.so.0
libwx_gtk2u_core-3.0.so libwx_gtk2u_media-3.0.so.0.1.0
libwx_gtk2u_stc-3.0.so.0 richtext.py xml.pi
dataview.pi _html2.so libwx_baseu_net-3.0.so.0.1.0
libwx_gtk2u_core-3.0.so.0 libwx_gtk2u_propgrid-3.0.so
libwx_gtk2u_stc-3.0.so.0.1.0 _richtext.so xml.py
dataview.py html.pi libwx_baseu_xml-3.0.so
libwx_gtk2u_core-3.0.so.0.1.0 libwx_gtk2u_propgrid-3.0.so.0
libwx_gtk2u_webview-3.0.so siplib.cpython-33m.so _xml.so
_dataview.so html.py libwx_baseu_xml-3.0.so.0
libwx_gtk2u_gl-3.0.so libwx_gtk2u_propgrid-3.0.so.0.1.0
libwx_gtk2u_webview-3.0.so.0 siplib.so xrc.pi
glcanvas.pi _html.so libwx_baseu_xml-3.0.so.0.1.0
libwx_gtk2u_gl-3.0.so.0 libwx_gtk2u_ribbon-3.0.so
libwx_gtk2u_webview-3.0.so.0.1.0 stc.pi xrc.py
glcanvas.py __init__.py libwx_gtk2u_adv-3.0.so
libwx_gtk2u_gl-3.0.so.0.1.0 libwx_gtk2u_ribbon-3.0.so.0
libwx_gtk2u_xrc-3.0.so stc.py _xrc.so

stat wx/siplib.cpython-33m.so

File: ‘wx/siplib.cpython-33m.so’
Size: 7691 Blocks: 16 IO Block: 4096 regular file
Device: 801h/2049d Inode: 16260 Links: 1
Access: (0755/-rwxr-xr-x) Uid: ( 0/ root) Gid: ( 50/ staff)
Access: 2014-03-14 14:54:27.000000000 +0400
Modify: 2014-03-14 14:54:27.000000000 +0400
Change: 2014-03-14 14:54:27.106665289 +0400
Birth: -

stat wx/siplib.so

File: ‘wx/siplib.so’
Size: 303862 Blocks: 600 IO Block: 4096 regular file
Device: 801h/2049d Inode: 16235 Links: 1
Access: (0755/-rwxr-xr-x) Uid: ( 0/ root) Gid: ( 50/ staff)
Access: 2014-03-14 14:54:22.000000000 +0400
Modify: 2014-03-14 14:54:22.000000000 +0400
Change: 2014-03-14 14:54:27.070665290 +0400
Birth: -

As you can see, there is a bogus siplib.cpython-33m.so which really should
be siplib.so. After replacing:

sudo mv wx/siplib.so wx/siplib.cpython-33m.so

"import wx" works fine.

Let's see into setup.py...

# Add a bogus extension module (will never be built here since we
# are overriding the build command to do it from build.py) so
# things like bdist_egg will know that there are extension modules
# and will name the dist with the full platform info.
ext_modules = [Extension('siplib', [])],

And let's recall the installation log...

<...>
Waf: Leaving directory `/tmp/pip-rawcle-build/build/waf/3.3'
'build' finished successfully (5m22.245s)

------------ BUILD FINISHED ------------
To use wxPython from the build folder (without installing):
- Set your PYTHONPATH variable to /tmp/pip-rawcle-build.
- You may also need to set your (DY)LD_LIBRARY_PATH to
/tmp/pip-rawcle-build/build/wxbld/lib, or wherever the wxWidgets libs have
been installed.

Finished command: build_py (5m23.167s)
Finished command: build (7m55.849s)
Done!
WARNING: Building this way assumes that all generated files have been
generated already. If that is not the case then use build.py directly
to generate the source and perform the build stage. You can use
--skip-build with the bdist_* or install commands to avoid this
message and the wxWidgets and Phoenix build steps in the future.

/usr/bin/python3 -u build.py build

warning: no previously-included files matching '.svn' found under
directory 'wx'
warning: no previously-included files matching '.git' found under
directory 'wx'
warning: no previously-included files matching '*.pyc' found under
directory 'wx'
warning: no previously-included files matching '__pycache__' found
under directory 'wx'
building 'siplib' extension
x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions
-Wl,-Bsymbolic-functions -Wl,-z,relro -Wno-unused-result -DNDEBUG -g
-fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector
--param=ssp-buffer-size=4 -Wformat -Werror=format-security
-Wl,-Bsymbolic-functions -Wl,-z,relro -g -fstack-protector
--param=ssp-buffer-size=4 -Wformat -Werror=format-security
-D_FORTIFY_SOURCE=2 -o build/lib.linux-x86_64-3.3/wx/siplib.cpython-33m.so
linking
/usr/local/lib/python3.3/dist-packages/wx/libwx_baseu_net-3.0.so.0 ->
libwx_baseu_net-3.0.so.0.1.0
linking
/usr/local/lib/python3.3/dist-packages/wx/libwx_gtk2u_richtext-3.0.so.0 ->
libwx_gtk2u_richtext-3.0.so.0.1.0
linking
/usr/local/lib/python3.3/dist-packages/wx/libwx_gtk2u_media-3.0.so.0 ->
libwx_gtk2u_media-3.0.so.0.1.0
linking
/usr/local/lib/python3.3/dist-packages/wx/libwx_baseu_xml-3.0.so ->
libwx_baseu_xml-3.0.so.0
linking /usr/local/lib/python3.3/dist-packages/wx/libwx_baseu-3.0.so.0
-> libwx_baseu-3.0.so.0.1.0
linking
/usr/local/lib/python3.3/dist-packages/wx/libwx_gtk2u_ribbon-3.0.so.0 ->
libwx_gtk2u_ribbon-3.0.so.0.1.0
linking
/usr/local/lib/python3.3/dist-packages/wx/libwx_gtk2u_adv-3.0.so ->
libwx_gtk2u_adv-3.0.so.0
linking
/usr/local/lib/python3.3/dist-packages/wx/libwx_baseu_xml-3.0.so.0 ->
libwx_baseu_xml-3.0.so.0.1.0
linking
/usr/local/lib/python3.3/dist-packages/wx/libwx_gtk2u_html-3.0.so.0 ->
libwx_gtk2u_html-3.0.so.0.1.0
linking
/usr/local/lib/python3.3/dist-packages/wx/libwx_gtk2u_xrc-3.0.so ->
libwx_gtk2u_xrc-3.0.so.0
linking
/usr/local/lib/python3.3/dist-packages/wx/libwx_gtk2u_webview-3.0.so.0 ->
libwx_gtk2u_webview-3.0.so.0.1.0
linking
/usr/local/lib/python3.3/dist-packages/wx/libwx_gtk2u_core-3.0.so.0 ->
libwx_gtk2u_core-3.0.so.0.1.0
linking
/usr/local/lib/python3.3/dist-packages/wx/libwx_gtk2u_html-3.0.so ->
libwx_gtk2u_html-3.0.so.0
linking
/usr/local/lib/python3.3/dist-packages/wx/libwx_baseu_net-3.0.so ->
libwx_baseu_net-3.0.so.0
linking
/usr/local/lib/python3.3/dist-packages/wx/libwx_gtk2u_ribbon-3.0.so ->
libwx_gtk2u_ribbon-3.0.so.0
linking
/usr/local/lib/python3.3/dist-packages/wx/libwx_gtk2u_adv-3.0.so.0 ->
libwx_gtk2u_adv-3.0.so.0.1.0
linking
/usr/local/lib/python3.3/dist-packages/wx/libwx_gtk2u_stc-3.0.so ->
libwx_gtk2u_stc-3.0.so.0
linking
/usr/local/lib/python3.3/dist-packages/wx/libwx_gtk2u_core-3.0.so ->
libwx_gtk2u_core-3.0.so.0
linking
/usr/local/lib/python3.3/dist-packages/wx/libwx_gtk2u_xrc-3.0.so.0 ->
libwx_gtk2u_xrc-3.0.so.0.1.0
linking /usr/local/lib/python3.3/dist-packages/wx/libwx_gtk2u_gl-3.0.so
-> libwx_gtk2u_gl-3.0.so.0
linking
/usr/local/lib/python3.3/dist-packages/wx/libwx_gtk2u_gl-3.0.so.0 ->
libwx_gtk2u_gl-3.0.so.0.1.0
linking
/usr/local/lib/python3.3/dist-packages/wx/libwx_gtk2u_propgrid-3.0.so.0 ->
libwx_gtk2u_propgrid-3.0.so.0.1.0
linking
/usr/local/lib/python3.3/dist-packages/wx/libwx_gtk2u_richtext-3.0.so ->
libwx_gtk2u_richtext-3.0.so.0
linking
/usr/local/lib/python3.3/dist-packages/wx/libwx_gtk2u_media-3.0.so ->
libwx_gtk2u_media-3.0.so.0
linking /usr/local/lib/python3.3/dist-packages/wx/libwx_baseu-3.0.so ->
libwx_baseu-3.0.so.0
linking
/usr/local/lib/python3.3/dist-packages/wx/libwx_gtk2u_aui-3.0.so.0 ->
libwx_gtk2u_aui-3.0.so.0.1.0
linking
/usr/local/lib/python3.3/dist-packages/wx/libwx_gtk2u_webview-3.0.so ->
libwx_gtk2u_webview-3.0.so.0
linking
/usr/local/lib/python3.3/dist-packages/wx/libwx_gtk2u_propgrid-3.0.so ->
libwx_gtk2u_propgrid-3.0.so.0
linking
/usr/local/lib/python3.3/dist-packages/wx/libwx_gtk2u_stc-3.0.so.0 ->
libwx_gtk2u_stc-3.0.so.0.1.0
linking
/usr/local/lib/python3.3/dist-packages/wx/libwx_gtk2u_aui-3.0.so ->
libwx_gtk2u_aui-3.0.so.0
Installing pyshell script to /usr/local/bin
Installing helpviewer script to /usr/local/bin
Installing img2py script to /usr/local/bin
Installing img2png script to /usr/local/bin
Installing pyslices script to /usr/local/bin
Installing pyslicesshell script to /usr/local/bin
Installing pycrust script to /usr/local/bin
Installing img2xpm script to /usr/local/bin
Installing pywxrc script to /usr/local/bin
Successfully installed wxPython-Phoenix
Cleaning up...

So this is clearly a bug in Phoenix installation config. The big comment
under ext_modules is wrong. This reminds me the history with that "sleep"
call in webkit <https://news.ycombinator.com/item?id=4466699>:

<Loading Image...>


четверг, 13 февраля 2014 г., 17:14:43 UTC+4 пПльзПватель
Post by a***@gmail.com
Hi list. I seems to have built and installed a snapshot build of phoenix
(wxPython_Phoenix-3.0.1.dev75841) without any errors that I noticed. When I
Python 3.3.2 (default, Dec 26 2013, 15:57:09)
[GCC 4.5.4] on linux
Type "help", "copyright", "credits" or "license" for more information.
Post by a***@gmail.com
import wx
File "<stdin>", line 1, in <module>
File "/usr/lib/python3.3/site-packages/wx/__init__.py", line 17, in
<module>
from wx.core import *
File "/usr/lib/python3.3/site-packages/wx/core.py", line 6, in <module>
from ._core import *
ImportError: dynamic module does not define init function (PyInit_siplib)
I'm sure I must have missed something simple, this seems far too basic an
error to be anything subtle.
Mike
--
You received this message because you are subscribed to the Google Groups "wxPython-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wxPython-dev+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Robin Dunn
2014-03-15 04:47:22 UTC
Permalink
Post by Vadim Markovtsev
So this is clearly a bug in Phoenix installation config. The big comment
under ext_modules is wrong.
Thanks for the diagnosis. I've been meaning to get rid of that hack or
finding a better way to do it.
--
Robin Dunn
Software Craftsman
http://wxPython.org
--
You received this message because you are subscribed to the Google Groups "wxPython-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wxPython-dev+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...