OK, based on what you said about gobject, I went back and changed version of it 
and some other packages; that is, I changed the way I set up the virtual 
environment from...

$ conda create -n gwyd python=2.7 numpy=1.15 pango=1.50.7 
BioBuilds::py2cairo=1.10.0 jochym::pygobject2=2.28 jochym::pygtk

...to...

$ conda create -n gwyd python=2.7 numpy=1.15 ska::pango ska::pygtk 
ska::pygobject ska::cairo

...and in this case I also have to build the libpng15 from source for the 
virtual environment. After doing that, I can access the Pygwy Console, and I 
can import gwyutils without an immediate error. However, when I try to use gwy 
I have problems. When I try to use the get_min_max() method shown on the Python 
Scripting page of the docs, I get an error ("AttributeError: 'module' object 
has no attribute '__file__'"); when I try to check the file path with 
gwy.__file__ I get an error ("AttributeError: 'module' object has no attribute 
'__file__'"). If I print gwyutils.__file__ the output is 
'/home/jds/miniconda3/envs/gwyd/share/gwyddion/pygwy/gwyutils.py', so that is 
working despite the fact that gwyutils itself imports gwy.

When I try to run a standalone pygwy script (for some reason I also have to 
install libpng12 from source to get the standalone script to "work"), I get a 
different error when trying to import gwy. Namely, the script...

#!/usr/bin/env python
import sys
sys.path.insert(0, '/home/jds/miniconda3/envs/gwyd/share/gwyddion/pygwy')
sys.path.insert(0, '/home/jds/.gwyddion/pygwy')
import gwy

...gives the error...

Traceback (most recent call last):
  File "runscript.py", line 5, in <module>
    import gwy
ImportError: /lib/x86_64-linux-gnu/libgtkglext-x11-1.0.so.0: undefined symbol: 
gtk_widget_get_realized

I really appreciate your help on this!
________________________________
From: David Nečas (Yeti) <y...@gwyddion.net>
Sent: Thursday, October 17, 2024 10:50 AM
To: Gwyddion use discussion <gwyddion-users@lists.sourceforge.net>
Subject: Re: [Gwyddion-users] Python error when trying to build from source 
with pygwy support

On Sun, Oct 13, 2024 at 08:41:02PM +0200, David Nečas (Yeti) wrote:
> We probably need at least a configure option to disable the old plugin
> stuff.

We kind of already had one, --disable-plugin-proxy. But it was only
disabling the mechanism itself; the various support files were still
installed. I changed it to disable plugin support completely (r26713).
So avoiding installation of the old plugin stuff should be much easier
in 2.67.

Regards,

Yeti



_______________________________________________
Gwyddion-users mailing list
Gwyddion-users@lists.sourceforge.net
https://urldefense.com/v3/__https://lists.sourceforge.net/lists/listinfo/gwyddion-users__;!!LkSTlj0I!Fi5IF1Ro8qSt2bYs9XG2oHfJRruVLDF10ruR_tSwp_mSe65L0xPYIx2NUz2_AEjg7CTzEaxBPGZXnIYk7GfhFA$
_______________________________________________
Gwyddion-users mailing list
Gwyddion-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gwyddion-users

Reply via email to