mailRe: gui vs wx python


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by Edward d'Auvergne on May 16, 2011 - 10:45:
Hi,

Sorry for not responding earlier.  I would not worry about the 32-bit
vs. 64-bit issues.  This appears to simply be a badly packaged
wxPython file for 64-bit Mac OS X.  Could you try the source wxPython
package and see if you can compile it?  You could possible try older
version of wxPython from here
http://sourceforge.net/projects/wxpython/files/wxPython/ as well to
see if it is a version issue.  The real issue is within wxPython and
not anything else.  I'm starting to wonder if the Mac OS X people need
a relax package which has everything bundled together (python,
wxPython, minfx (http://gna.org/projects/minfx/), bmrblib
(http://gna.org/projects/bmrblib/), python-devel, scipy, scientific,
etc.).  This would be a huge effort though and would need to be
automated via scripts to build the package.

Regards,

Edward



On 25 April 2011 15:18, Sébastien Morin <sebastien.morin.1@xxxxxxxxx> wrote:
Hi,

Instead of switching the system python installation to its 32-bit version
using "export VERSIONER_PYTHON_PREFER_32_BIT=yes", as stated before, I
manually switched to using 32-bit python (2.6.6), numpy (1.5.1) and scipy
(0.9.0) from fink (instead of 64-bit python 2.6.1, numpy 2.0.0, and scipy
0.10.0 directly under Mac OS X). As relax uses the "/usr/bin/env python" in
order to get the python path (header of executable file "relax"), I had to
manually change it to "/sw/bin/python2.6" (the fink path for python-2.6
binary) to do so.

The unit tests all passed without the warnings discussed before (post at
https://mail.gna.org/public/relax-devel/2011-04/msg00050.html ; Message-id:
<4DB419A4.1030201@xxxxxxxxx>). The warnings were also absent from the system
tests, although 9 errors arose because of the unavailability of the C
modules:

====
RelaxError: RelaxError: Relaxation curve fitting is not available.  Try
compiling the C modules on your platform.
====

The C modules, however, compiled without error using scons-1.2.0-2 (also
from fink). However, when starting the relax prompt, the following error
arose:

====
ImportError:
dlopen(/Users/semor/Documents/pse-4/collaborations/relax/relax-1.3/maths_fns/relax_fit.so,
2): no suitable image found.  Did find:

 
/Users/semor/Documents/pse-4/collaborations/relax/relax-1.3/maths_fns/relax_fit.so:
mach-o, but wrong architecture
Relaxation curve fitting is unavailable, try compiling the C modules.
====

It is as if, although python is switched to the 32-bit version from fink,
scons still compiles the executables for the 64-bit Mac OS X system...
Indeed, the command file yields the following output:

====
./maths_fns/relax_fit.so: Mach-O 64-bit bundle x86_64
./maths_fns/c_chi2.os:      Mach-O 64-bit object x86_64
./maths_fns/exponential.os: Mach-O 64-bit object x86_64
./maths_fns/relax_fit.os:   Mach-O 64-bit object x86_64
====

Moreover, in addition to the C modules not being compiled properly, it turns
out that fink does not allow the installation of wxPython. Hence, I had to
use the module installed for the system 64-bit python. In 32-bit python,
this module loaded without error. However, when starting the gui ("relax
-g", the following error arose:

====
This program needs access to the screen.
Please run with 'pythonw', not 'python', and only when you are logged
in on the main display of your Mac.
====

Apparently, pythonw is present for the system (which is, unfortunately,
64-bit, thus incompatible to wxPython), but not present with the fink
installation (which is 32-bit, but since lacks pythonw, can't have access to
the graphical interface)...

This situaiton is becoming more and more complicated...
Maybe a simpler fix would be to find  simple way to really use a 32-bit
version of the system python installation...
Any idea how to solve this ?


Séb  :)



On 11-04-25 10:38 AM, Sébastien Morin wrote:

Hi,

In order to test the gui by manually changing to 32-bit python, I typed
the following command:

     export VERSIONER_PYTHON_PREFER_32_BIT=yes

Python was then working in 32-bit mode, which allowed the import of wx
within python, hence allowing the dependency check for wx to pass and
the launch of the gui.

However, I then got the following error:

====
ImportError:

dlopen(/Library/Python/2.6/site-packages/scipy-0.10.0.dev_20110325-py2.6-macosx-10.6-universal.egg/scipy/special/_cephes.so,
2): Symbol not found: _aswfa_
   Referenced from:

/Library/Python/2.6/site-packages/scipy-0.10.0.dev_20110325-py2.6-macosx-10.6-universal.egg/scipy/special/_cephes.so
   Expected in: flat namespace
  in

/Library/Python/2.6/site-packages/scipy-0.10.0.dev_20110325-py2.6-macosx-10.6-universal.egg/scipy/special/_cephes.so
====

Testing further, it turns out that the relax prompt yields the same
error, similarly to the relax test-suite (i.e. the following commands
all yield the same error: "relax", "relax -g", "relax -u", "relax -s",
"relax -t", "relax -h", etc).

My scipy version is 0.10.0.dev (running under python 6.2.1, now in
32-bit mode). As reported in a recent post at
https://mail.gna.org/public/relax-devel/2011-04/msg00050.html
(Message-id:<4DB419A4.1030201@xxxxxxxxx>), testing scipy yielded some
errors and failures which could be related to the current problem (or
not).

Any idea what this could be a problem with running 32-bit python under
Mac OS X, or a problem specific to relax ???

Anyway, it turns out that simply switching from 64-bit to 32-bit python
under Mac OS X does not allow the use of the gui...

Thanks a lot !!!!!!


Séb  :)



On 11-04-24 9:29 PM, Sébastien Morin wrote:

Hi,

I just installed wxPython on my Mac running OS X in order to be able to
run the relax gui.

I installed "wxPython2.8-osx-unicode-py2.6" from
"http://www.wxpython.org/download.php#stable";.

When trying to start the gui, I get the following message:

      ""RelaxError: To use the GUI, the wx python module must be
installed."

When I try to import wx withon python, the module seems there, but not
working, as I get the following error:

====
import wx
Traceback (most recent call last):
    File "<stdin>", line 1, in<module>
    File

"//usr/local/lib/wxPython-unicode-2.8.12.0/lib/python2.6/site-packages/wx-2.8-mac-unicode/wx/__init__.py",
line 45, in<module>
      from wx._core import *
    File

"//usr/local/lib/wxPython-unicode-2.8.12.0/lib/python2.6/site-packages/wx-2.8-mac-unicode/wx/_core.py",
line 4, in<module>
      import _core_
ImportError:

/usr/local/lib/wxPython-unicode-2.8.12.0/lib/python2.6/site-packages/wx-2.8-mac-unicode/wx/_core_.so:
no appropriate 64-bit architecture (see "man python" for running in
32-bit mode)
====

On the wx python website, it is said that "These binaries should work on
all versions of OSX from 10.3.9 onwards on either PPC or i386
architectures. Since they use the Carbon API they are limited to running
in 32-bit mode."

However, my machine, a Macbook pro, is 64 bit and python runs in 64 bits
by default. I found that python can be set to use 32 or 64 bits.
However, I am afraid that these settings are system-wide. Would there be
a way that relax tells the system to run python in 32 bit mode, maybe
only when the gui is invoked ?

Maybe this is too much asked... However, if it is simple, I guess it
would simplify the life of many users with recent Mac computers...

Thanks a lot !


Séb  :)


--
Sébastien Morin, Ph.D.
Postdoctoral fellow
S. Grzesiek NMR Laboratory
Biozentrum, Universität Basel
Basel, Switzerland


_______________________________________________
relax (http://nmr-relax.com)

This is the relax-devel mailing list
relax-devel@xxxxxxx

To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-devel




Related Messages


Powered by MHonArc, Updated Mon May 16 11:40:11 2011