Re: wxPython Phoenix build fail ("Could not build python extensions"?) in pyenv 3.5.1 on Linux

Michael Freeman <[email protected]>
Newsgroups gmane.comp.python.wxpython.devel
Message-ID <[email protected]>
On Thursday, September 8, 2016 at 1:46:09 AM UTC+1, Robin Dunn wrote:
>
> Michael Freeman wrote: 
> > The last error was due to something to do with having to use "python3" 
> > not "python" for the compilation for a reason I don't pretend to 
> > understand. Here is the description of the same issue someone else 
> > had: 
> > 
> http://stackoverflow.com/questions/36723206/cython-compilation-error-dynamic-module-does-not-define-module-export-function 
> > 
> > So that made the build command: /opt/python3.5.1/bin/python3.5 
> > build.py -j 7 dox etg --nodoc sip build 2>&1 | tee 
> > phoenix_build_output.txt 
>
> Yes, when building any Python extension module it is important to use 
> the same Python you are intending to use the built module with.  On your 
> system "python" is probably a symlink to python2.7 and the command 
> "python3" to the python3.5 binary.  Look at `ls -l /usr/bin/python*` to 
> check. 
>
> I eventually used the Debian/Ubuntu "alternatives" system ( 
http://manpages.ubuntu.com/manpages/trusty/man8/update-alternatives.8.html 
) which I should have used to begin with. It's all been complicated by the 
fact that the Ubuntu system Python is tied into system functions so 
changing it breaks package updates. I also needed specifically to build 
against Python 3.5.1 for Blender. I did replace system Python with 3.5.1 
using the alternatives system. So "/usr/bin/python" is actually a symlink 
to python3.5. It's identical accept for the name difference between 
"python" in "/usr/bin/" and "python3.5" in "/opt/python3.5.1/bin/". But, 
don't ask me why, that effects compilation of Phoenix leading to the errors 
quoted above.
 

> > 
> > Demo's appear to run OK (apart from "demo.py" which get's stuck with 
> > 100% cpu usage but I assume it's huge and did not wait for completion). 
>
> You shouldn't need to.  The main demo starts up with just a small-ish 
> app and doesn't load the rest of the demo modules until they are 
> selected.  If it was stuck then something unexpected is happening and it 
> would be good to investigate it. 
>
> I'll give that another go.  

On Thursday, September 8, 2016 at 1:49:46 AM UTC+1, Robin Dunn wrote:
>
> Michael Freeman wrote: 
> > So, finally, I got past the current error. It was pyenv ! I posted 
> > them an issue: https://github.com/yyuu/pyenv/issues/691 
>
> Which was why I suggested trying it in a normal Python virtualenv or 
> venv that was created from the stock Python on your system, instead of 
> using pyenv's custom builds.


Yes, I should have made more of an effort to replace the system python ! 
But I'd forgotten about the alternatives system until up to recently.
 

>
>
> > But first I could just use wx in Windows but I chose Phoenix because 
> > its cross platform (nad it has to be Python 3 because of Blender). I 
> > don't want to restrict myself and other users to just Windows for the 
> > project. So what is the status of Phoenix ? Are these just a few 
> > random bugs or is Phoenix still some way off "prime time" as it were ? 
> > I don't mind helping with the development but will have to consider 
> > another Python GUI module eventually as I can't spend all my time on 
> this. 
>
> The plan is to have an official alpha soonish, once I have completed 
> some of the things I have in progress right now.  The actual content of 
> the alpha won't be much different than what is in the snapshot builds 
> currently.  But the plan is to also start putting it on PyPI, so it will 
> end up being more of an implementation and test of a new release 
> process, and also a means of making a statement to the community that ...
>

I'm not experienced enough to help with any of that yet, I'm too new to 
wxPython. But we've covered a lot of ground here building for Linux that I 
could put into a guide. I also plan to write a guide, based on the thread 
here, specifically for Blender users (this may apply to other software 
bundled with specific Python versions). The central problem with building 
the wxPython Phoenix wheel/source for Blender on Ubuntu and Debian is that 
it's not easy for a normal user to install a specific Python version using 
the usual "sudo apt-get install".

Michael Z Freeman
 

> -- 
> 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 [email protected].
For more options, visit https://groups.google.com/d/optout.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.