I have been using python 2.5 and wxPython 2.8 on Windows for the last
while. I am now trying to get set up to port some work to Ubuntu Edgy.
The default installation of python there is 2.4, and installing wxPython 2.8
from the wxPython APT repository at wxcommunity.com worked fine. So
now, wxPython 2.8 works with python 2.4, but not with python 2.5.
My question is, what do I have to do to get wxPython working with python 2.5?
Do I have to compile from source? If I do, are there any special steps needed
to control which version of python it uses? Thanks for any clues.
See the information about getting wxPython set up for Ubuntu near the bottom of Redirecting... .
- Josiah
···
"Michael Moriarity" <datasmith@gmail.com> wrote:
Hello List:
I have been using python 2.5 and wxPython 2.8 on Windows for the last
while. I am now trying to get set up to port some work to Ubuntu Edgy.
The default installation of python there is 2.4, and installing wxPython 2.8
from the wxPython APT repository at wxcommunity.com worked fine. So
now, wxPython 2.8 works with python 2.4, but not with python 2.5.
My question is, what do I have to do to get wxPython working with python 2.5?
Do I have to compile from source? If I do, are there any special steps needed
to control which version of python it uses? Thanks for any clues.
I have been using python 2.5 and wxPython 2.8 on Windows for the last
while. I am now trying to get set up to port some work to Ubuntu Edgy.
The default installation of python there is 2.4, and installing wxPython 2.8
from the wxPython APT repository at wxcommunity.com worked fine. So
now, wxPython 2.8 works with python 2.4, but not with python 2.5.
Why not?? check my config below and right now Im working fine with it
My question is, what do I have to do to get wxPython working with python 2.5?
Do I have to compile from source? If I do, are there any special steps needed
to control which version of python it uses? Thanks for any clues.
If you check in Synaptic you found Python 2.5, installed it and work
with it, but dont erase the 2.4 version because some app still need that
version... in the Ubuntu forums you could find more info about this
topic.
1.
Thanks, Josiah, that is where I got the package I installed. There is no
mention on that page of python 2.4 versus python 2.4 in the context of
Ubuntu. So I will just have to keep searching for what to do next.
regards, michael
···
On 1/31/07, Josiah Carlson <jcarlson@uci.edu> wrote:
See the information about getting wxPython set up for Ubuntu near the bottom of Redirecting... .
Thanks, Mario. I have the same configuration as you, I believe. That is,
I am running Edgy, fully updated. And I have, indeed, installed python 2.5
using Synaptic. It works fine, if I type "python2.5" at the command line.
But, I have left python 2.4 as the default, for fear of breaking some system
script written for python 2.4.
My problem is, when I run the command "python", to start python 2.4, I
can import wx successfully. But if I start "python2.5", import wx gets an
Import Error. My question is, how do I make this version of python able
to import wx? Is it as simple as copying some directories, or making
some symbolic links, or is a different build of the dlls necessary?
regards, michael
···
On 1/31/07, Mario Lacunza <mlacunza@gmail.com> wrote:
>
Why not?? check my config below and right now Im working fine with it
If you check in Synaptic you found Python 2.5, installed it and work
with it, but dont erase the 2.4 version because some app still need that
version... in the Ubuntu forums you could find more info about this
topic.
1.
Thanks, Mario. I have the same configuration as you, I believe. That is,
I am running Edgy, fully updated. And I have, indeed, installed python 2.5
using Synaptic. It works fine, if I type "python2.5" at the command line.
But, I have left python 2.4 as the default, for fear of breaking some system
script written for python 2.4.
Thats correct...
My problem is, when I run the command "python", to start python 2.4, I
can import wx successfully. But if I start "python2.5", import wx gets an
Import Error. My question is, how do I make this version of python able
to import wx? Is it as simple as copying some directories, or making
some symbolic links, or is a different build of the dlls necessary?
regards, michael
aja... put the error here please...
···
El mié, 31-01-2007 a las 13:23 -0500, Michael Moriarity escribió:
On 1/31/07, Mario Lacunza <mlacunza@gmail.com> wrote:
My problem is, when I run the command "python", to start python 2.4, I
can import wx successfully. But if I start "python2.5", import wx gets an
Import Error. My question is, how do I make this version of python able
to import wx? Is it as simple as copying some directories, or making
some symbolic links, or is a different build of the dlls necessary?
You need a different build of wx. I don't know if there is an edgy .deb for it, but if not, then you need to built it following the directions on the wxPython page, and making sure you use python2.5 when you run setup.py to build it.
-Chris
···
--
Christopher Barker, Ph.D.
Oceanographer
Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
On 1/31/07, Christopher Barker <Chris.Barker@noaa.gov> wrote:
You need a different build of wx. I don't know if there is an edgy .deb
for it, but if not, then you need to built it following the directions
on the wxPython page, and making sure you use python2.5 when you run
setup.py to build it.
and if possible have both wx instalations?: wx=>Python2.5 and
wx=>Python2.4
···
El mié, 31-01-2007 a las 10:33 -0800, Christopher Barker escribió:
Michael Moriarity wrote:
> My problem is, when I run the command "python", to start python 2.4, I
> can import wx successfully. But if I start "python2.5", import wx gets an
> Import Error. My question is, how do I make this version of python able
> to import wx? Is it as simple as copying some directories, or making
> some symbolic links, or is a different build of the dlls necessary?
You need a different build of wx. I don't know if there is an edgy .deb
for it, but if not, then you need to built it following the directions
on the wxPython page, and making sure you use python2.5 when you run
setup.py to build it.
That's it. It's kind of complicated, but if you follow the instructions carefully, it's doable.
and if possible have both wx installations?: wx=>Python2.5 and
wx=>Python2.4
Absolutely. You can even have different versions of wxPython with each Python version! (see wxversion module).
You just need to make sure you run setup.py with the Python you want:
python2.5 setup.py build_ext --inplace --debug
-Chris
···
--
Christopher Barker, Ph.D.
Oceanographer
Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
My problem is, when I run the command "python", to start python 2.4, I
can import wx successfully. But if I start "python2.5", import wx gets an
Import Error. My question is, how do I make this version of python able
to import wx? Is it as simple as copying some directories, or making
some symbolic links, or is a different build of the dlls necessary?
On Linux you could probably get away with using the 2.4 modules with 2.5, but you'll get a warning every time you import an extension module that was built with a different version of the Python API. So yes, you'll want to build a Python 2.5 specific version of wxPython.
One of these days I'll put in the effort to the .deb builds to make the packages be specific to the version of Python, and then add a set of umbrella packages so the default version will be installed by default. I just need to clone myself another couple times to find the time to do it. Or recruit somebody to do it for me
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
When I run that command, it fails with this complaint:
checking for C compiler default output file name... configure: error:
C compiler cannot create executables
See `config.log' for more details.
the relevant portion of config.log seems to be this:
configure:12105: checking for gcc
configure:12121: found /usr/bin/gcc
configure:12131: result: gcc
configure:12375: checking for C compiler version
configure:12378: gcc --version </dev/null >&5
gcc (GCC) 4.1.2 20060928 (prerelease) (Ubuntu 4.1.1-13ubuntu5)
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
configure:12381: $? = 0
configure:12383: gcc -v </dev/null >&5
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v
--enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr
--enable-shared --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix --enable-nls
--program-suffix=-4.1 --enable-__cxa_atexit --enable-clocale=gnu
--enable-libstdcxx-debug --enable-mpfr --enable-checking=release
i486-linux-gnu
Thread model: posix
gcc version 4.1.2 20060928 (prerelease) (Ubuntu 4.1.1-13ubuntu5)
configure:12386: $? = 0
configure:12388: gcc -V </dev/null >&5
gcc: '-V' option must have argument
configure:12391: $? = 1
configure:12414: checking for C compiler default output file name
configure:12417: gcc conftest.c >&5
/usr/bin/ld: crt1.o: No such file: No such file or directory
collect2: ld returned 1 exit status
configure:12420: $? = 1
configure: failed program was:
configure:12459: error: C compiler cannot create executables
See `config.log' for more details.
I have not worked with a C compiler for many years, so I have no idea
what this error really means or how to fix it. Any suggestions would be
much appreciated.
If your answer is yes, install via Synaptic wxWidgets packages I suppose
then C compiler dont found its and let me know if you pass, because if
possible then in the next weekend Ill make the same job
When I run that command, it fails with this complaint:
checking for C compiler default output file name... configure: error:
C compiler cannot create executables
See `config.log' for more details.
the relevant portion of config.log seems to be this:
configure:12105: checking for gcc
configure:12121: found /usr/bin/gcc
configure:12131: result: gcc
configure:12375: checking for C compiler version
configure:12378: gcc --version </dev/null >&5
gcc (GCC) 4.1.2 20060928 (prerelease) (Ubuntu 4.1.1-13ubuntu5)
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
configure:12381: $? = 0
configure:12383: gcc -v </dev/null >&5
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v
--enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr
--enable-shared --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix --enable-nls
--program-suffix=-4.1 --enable-__cxa_atexit --enable-clocale=gnu
--enable-libstdcxx-debug --enable-mpfr --enable-checking=release
i486-linux-gnu
Thread model: posix
gcc version 4.1.2 20060928 (prerelease) (Ubuntu 4.1.1-13ubuntu5)
configure:12386: $? = 0
configure:12388: gcc -V </dev/null >&5
gcc: '-V' option must have argument
configure:12391: $? = 1
configure:12414: checking for C compiler default output file name
configure:12417: gcc conftest.c >&5
/usr/bin/ld: crt1.o: No such file: No such file or directory
collect2: ld returned 1 exit status
configure:12420: $? = 1
configure: failed program was:
> /* confdefs.h. */
>
> #define PACKAGE_NAME "wxWidgets"
> #define PACKAGE_TARNAME "wxwidgets"
> #define PACKAGE_VERSION "2.8.1"
> #define PACKAGE_STRING "wxWidgets 2.8.1"
> #define PACKAGE_BUGREPORT "wx-dev@lists.wxwidgets.org"
> #define __LINUX__ 1
> /* end confdefs.h. */
>
> int
> main ()
> {
>
> ;
> return 0;
> }
configure:12459: error: C compiler cannot create executables
See `config.log' for more details.
I have not worked with a C compiler for many years, so I have no idea
what this error really means or how to fix it. Any suggestions would be
much appreciated.
regards, michael
--
Saludos / Best regards
Mario Lacunza Vásquez
Desarrollador de Software - Webmaster
Linux Registered User #439179
Desarrollador 2 Estrellas VS2005
I've been trying anything I could think of, but no luck so far.
I tried running the configure script as root, just in case, but the
result was the same. "C compiler cannot create executables"
So, I decided to try compiling the classic hello world program.
#include <stdlib.h> #include <stdio.h>
int main(void)
{
printf("Hello, world.\n");
return(0);
}
The result is:
$ gcc hello.c
hello.c:1:20: error: stdlib.h: No such file or directory
hello.c:2:19: error: stdio.h: No such file or directory
hello.c: In function 'main':
hello.c:6: warning: incompatible implicit declaration of built-in
function 'printf'
Searching for stdlib.h and stdio.h fails to turn them up anywhere.
So, it seems that gcc is installed, but the standard C header files are not.
Does anyone have a clue why this might be, or what I should do to fix it?
For Mario, and anyone else who might be considering compiling wx
on Ubuntu, I have discovered that there is a package called build-essential
which is not part of the default distribution. So, the C compiler is installed
by default, but not the standard headers, it seems. Anyway, installing this
package makes hello.c compile correctly, and also gets rid of the error in
the wx configure script. Now, I just have to follow up on some missing libs,
and I can try a make.
Yeeesssss.....!! but I thinking then you have installed....
Please let me know if you have some more troubles...
Thanks!
···
El jue, 01-02-2007 a las 10:13 -0500, Michael Moriarity escribió:
For Mario, and anyone else who might be considering compiling wx
on Ubuntu, I have discovered that there is a package called build-essential
which is not part of the default distribution. So, the C compiler is installed
by default, but not the standard headers, it seems. Anyway, installing this
package makes hello.c compile correctly, and also gets rid of the error in
the wx configure script. Now, I just have to follow up on some missing libs,
and I can try a make.
I installed a bunch of dev packages that were required. gtk+, libpng, zlib,
and so on, which were indicated as missing in config.log. Generally, the
runtimes were installed as part of the Edgy disto, but the dev files were not.
Finally, I got a clean configure run. Then I created a .make file as suggested
in the build instructions, with the following contents:
make $* \
&& make -C contrib/src/gizmos $* \
&& make -C contrib/src/stc $*
Running
./.make
then
./.make install
seems to have produced a version of wxWidgets in my target directory,
/opt/wx/2.8_py2.5
So next, I started on the wxPython build. In $WXDIR/wxPython, I created
a .setup file, with the following contents:
The build command seems to be running correctly, but a final problem
crops up when the install command runs.
error: invalid Python installation: unable to open
/usr/include/python2.5/pyconfig.h (No such file or directory)
Well, /usr/include/python2.5 does exist, but does not contain pyconfig.h, so
I will soldier on, attempting to find that file. If I am lucky, I only
need to install
a dev package for python 2.5. If I am not so lucky, I may have to
build python 2.5
from source. I will report what happens.
Well, installing the python2.5 dev package was the answer, and now the
wxPython build and install work apparently successfully. However, when
I run python2.5 and try import wx, another problem raises its ugly head:
import wx
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "wx/__init__.py", line 45, in <module>
from wx._core import *
File "wx/_core.py", line 4, in <module>
import _core_
ImportError: libwx_gtk2ud_aui-2.8.so.0: cannot open shared object
file: No such file or directory
Upon inspection, the file does exist, here:
/opt/wx/2.8_py2.5/lib/libwx_gtk2ud_aui-2.8.so.0
I thought that I had insured it would be found there, by using
--enable-rpath=/opt/wx/2.8_py2.5/lib
as an argument to the original configure command, but I guess not.
Can anyone suggest what it will take to clear this (hopefully final) hurdle?