m27trognondepomme Posté 30 août 2024 Posté 30 août 2024 je viens de tester avec une VM LUbuntu 23.04 : ça marche. Le 30/08/2024 à 09:06, rmor51 a dit : Pour Pyastro3 pas de solution. Voir davantage voir ma réponse : Le 30/08/2024 à 08:00, m27trognondepomme a dit : Pour PyAstro3, je pense qu'il faut installer la vielle version 2.7 de python ( elle n'est plus maintenue) et faire "sudo apt-get install python-is-python2" ( ça va créer un lien symbolique sur python -> python2.7). Mais tu risque d'avoir d'autres soucis avec des applications utilisant python3. L'idéal serait d'installer python2.7 et de modifier les entêtes des fichiers *.py de PyAstro3. Citation #!/usr/bin/env python # Gimp-Python - allows the writing of Gimp plugins in Python. Voir davantage par Citation #!/usr/bin/env python2 # Gimp-Python - allows the writing of Gimp plugins in Python. Voir davantage @Ludovic BellierSur windows, il n'y a pas de problème car gimp est livré avec python2.7 . Voir davantage Citer
m27trognondepomme Posté 30 août 2024 Posté 30 août 2024 Malheureusement sur la version ubuntu 23.04, le paquet python2 n'existe plus Citer
m27trognondepomme Posté 30 août 2024 Posté 30 août 2024 (modifié) peux-tu m'envoyer le fichier ~/pyGapM27_stdout.txt pour analyse. J'ai testéla fonction sur Archlinux : ça fonctionne chez moi. Tu as quoi comme distribution linux ? Modifié 30 août 2024 par m27trognondepomme Citer
m27trognondepomme Posté 30 août 2024 Posté 30 août 2024 (modifié) J'ai testé la fonction sur LUbuntu 24.04 : ça fonctionne chez moi. Modifié 30 août 2024 par m27trognondepomme Citer
rmor51 Posté 30 août 2024 Auteur Posté 30 août 2024 MINT 21.1 64 bits sur mon desktop et laptop. Heureusement, ça fonctionne encore sur ce dernier ! GIMP 3 est annoncée pour quand ? Citer
m27trognondepomme Posté 30 août 2024 Posté 30 août 2024 Le 30/08/2024 à 16:55, rmor51 a dit : GIMP 3 est annoncée pour quand ? Voir davantage Pas de date officielle : la roadmap => https://developer.gimp.org/core/roadmap/#gimp-30-development-branch-roadmap Citer
rmor51 Posté 31 août 2024 Auteur Posté 31 août 2024 Le 30/08/2024 à 15:55, m27trognondepomme a dit : peux-tu m'envoyer le fichier ~/pyGapM27_stdout.txt pour analyse. Voir davantage Le seul fichier txt est note.txt, pas de pygapm27_stdout.txt. J'ai désinstallé, réinstaller GIMP avec snap, sans aucun résultat. Avec snap c'est la version 2.10.38. et toujours pas de fichier stdout Avec snap, c'est la version 2.10.30. Le menu pygap apparaît bien mais aucun greffon ne fonctionne, comme précédemment. PS: J'ai enfin dégoté le fichier en question. Il est à la racine de mon répertoire user ! pyGapM27_stdout.txtFetching info... Citer
keymlinux Posté 31 août 2024 Posté 31 août 2024 @rmor51 Il me semble que l'usage de plugins ne va pas être possible avec une application packagée "snap". Ce n'est pas une limitation de Gimp ou des plugin mais bien une limitation liée au "confinement" qui accompagne un snap. Avec des packages DEB ou RPM on distribue des applis qui s'installent sur l'OS et qui utilisent des ressources (comme les librairies et autres binaires) disponibles (ici aussi il peut y avoir des confinements liés à AppArmor) Avec SNAP on créé un conteneur qui contient l'application et ses dépendances (le package contient en fait l'image d'un filesystem de type squachFS monté en mémoire) Ci dessous 2 liens, le premier qui explique les SNAP et comment les manipuler, et le second datant de 2018 où le développeur qui package GIMP en SNAP posait la question de "comment utiliser des plugin externes dans une application package SNAP" (je ne sais pas si depuis une solution a été trouvée) https://doc.ubuntu-fr.org/snap https://forum.snapcraft.io/t/gimp-plugins-from-third-parties/8391 @m27trognondepomme Sur mon MacOS Mojave 10.14 (avec par défaut un python 2.7.16 installé nativement par l'OS) avec GIMP 2.10.36, j'ai finalement réussi a faire fonctionner les plugins. Le problème se situait au niveau du chargement des librairies libgimp et libgegl. Fair des liens symboliques de ces librairies (qui sont dans le répertoire des binaires gimp) vers /usr/local/lib n'a pas suffit. Dans la répertoires de tes plugins, j'ai dû modifier "gimp2/libgimp2.py" pour forcer le chemin d'accès aux librairies (c'est moche mais cela fonctionne) from ctypes import CDLL from sys import platform __ALL__ = [ 'gimp2', 'gegl' ] def load_library (library_name): if platform == "darwin" : library_name = library_name + '.0.dylib' elif platform == "linux" or platform == "linux2": library_name = library_name + '.so.0' elif platform == "win32": from ctypes.util import find_library library_name = find_library (library_name + "-0") else: raise BaseException ("TODO") return CDLL(library_name) gimp2 = load_library ('/usr/local/lib/libgimp-2.0') gegl = load_library ('/usr/local/lib/libgegl-0.4') EDIT: si je ne force pas le chemin de ces librairies, elles ne sont pas trouvée et j'obtiens le même message d'erreur que @rmor51 lors de l'utilisation des plugin 1 Citer
rmor51 Posté 31 août 2024 Auteur Posté 31 août 2024 Pour le Snap, j'ai fait l'install avec le paramètre --devmode qui résout le problème d'accès aux répertoires. Citer
keymlinux Posté 31 août 2024 Posté 31 août 2024 @rmor51J'ai testé dans 2 VMs linux 1 - ubuntu 24.4, gimp installé via SNAP avec option devmode --> pas réussi a faire fonctionner le plugin 2- Mint 22 (Wilma), gimp installé via APT (package natif, pas un SANP), plus package "python-is-python3", fonctionnement OK Citer
rmor51 Posté 31 août 2024 Auteur Posté 31 août 2024 J'ai installé MINT V22 Wilma 64 bits. Aucune amélioration. J'ai le menu pyGap mais aucun plugin ne fonctionne. Pas de menu pyAstro. En outre Kstars et quelques autres softs ne peuvent plus s'intaller ou fonctionner. Bonjour la mise à jour ! Citer
m27trognondepomme Posté 31 août 2024 Posté 31 août 2024 Le 31/08/2024 à 09:30, keymlinux a dit : @rmor51 Il me semble que l'usage de plugins ne va pas être possible avec une application packagée "snap". Ce n'est pas une limitation de Gimp ou des plugin mais bien une limitation liée au "confinement" qui accompagne un snap. Avec des packages DEB ou RPM on distribue des applis qui s'installent sur l'OS et qui utilisent des ressources (comme les librairies et autres binaires) disponibles (ici aussi il peut y avoir des confinements liés à AppArmor) Avec SNAP on créé un conteneur qui contient l'application et ses dépendances (le package contient en fait l'image d'un filesystem de type squachFS monté en mémoire) Ci dessous 2 liens, le premier qui explique les SNAP et comment les manipuler, et le second datant de 2018 où le développeur qui package GIMP en SNAP posait la question de "comment utiliser des plugin externes dans une application package SNAP" (je ne sais pas si depuis une solution a été trouvée) https://doc.ubuntu-fr.org/snap https://forum.snapcraft.io/t/gimp-plugins-from-third-parties/8391 @m27trognondepomme Sur mon MacOS Mojave 10.14 (avec par défaut un python 2.7.16 installé nativement par l'OS) avec GIMP 2.10.36, j'ai finalement réussi a faire fonctionner les plugins. Le problème se situait au niveau du chargement des librairies libgimp et libgegl. Fair des liens symboliques de ces librairies (qui sont dans le répertoire des binaires gimp) vers /usr/local/lib n'a pas suffit. Dans la répertoires de tes plugins, j'ai dû modifier "gimp2/libgimp2.py" pour forcer le chemin d'accès aux librairies (c'est moche mais cela fonctionne) from ctypes import CDLL from sys import platform __ALL__ = [ 'gimp2', 'gegl' ] def load_library (library_name): if platform == "darwin" : library_name = library_name + '.0.dylib' elif platform == "linux" or platform == "linux2": library_name = library_name + '.so.0' elif platform == "win32": from ctypes.util import find_library library_name = find_library (library_name + "-0") else: raise BaseException ("TODO") return CDLL(library_name) gimp2 = load_library ('/usr/local/lib/libgimp-2.0') gegl = load_library ('/usr/local/lib/libgegl-0.4') EDIT: si je ne force pas le chemin de ces librairies, elles ne sont pas trouvée et j'obtiens le même message d'erreur que @rmor51 lors de l'utilisation des plugin Voir davantage je vais ajouter un mécanisme de recherche dans les répertoires habituels (/lib, /usr/lib, /usr/local/lib ) pour linux et MacOS Citer
m27trognondepomme Posté 31 août 2024 Posté 31 août 2024 @keymlinux peux-tu essayer ceci pour le fichier gimp2/libgimp2.py from ctypes import CDLL from sys import platform __ALL__ = [ 'gimp2', 'gegl' ] def load_library (library_name): from ctypes.util import find_library if platform == "darwin" : library_name = find_library(library_name[3:]) elif platform == "linux" or platform == "linux2": library_name = find_library(library_name[3:]) elif platform == "win32": library_name = find_library (library_name + "-0") else: raise BaseException ("TODO") print("Library:",library_name) return CDLL(library_name) gimp2 = load_library ('libgimp-2.0') gegl = load_library ('libgegl-0.4') gegl.gegl_init (None, None) Citer
keymlinux Posté 31 août 2024 Posté 31 août 2024 Le 31/08/2024 à 19:35, rmor51 a dit : J'ai installé MINT V22 Wilma 64 bits. Aucune amélioration. J'ai le menu pyGap mais aucun plugin ne fonctionne. Pas de menu pyAstro. En outre Kstars et quelques autres softs ne peuvent plus s'intaller ou fonctionner. Bonjour la mise à jour ! Voir davantage 1 - la VM Mint22 je ne l'utilise pas pour faire de l'astro. J'ai juste installé pour tester les packages "gimp" et "python-is-python3', ainsi que le plugin pygapM27 et cela a fonctionné sans avoir à bricoler. 2- La VM Ubuntu 24.4 est ma VM de test Nafabox (récemment mise a jour de Ubuntu 20.4 a 24.4) et oui je confirme que coté logiciels astro il n'y a plus grand chose qui fonctionne, c'est en partie dû a la mise a jour en elle même avec de nombreuses librairies modifiées donc des soucis de dépendances pour plein de soft, mais aussi au fait que la plupart de developpeurs n'ont pas encore publié de package pour cette distribution --> par exemple la mise a jour recente 3.7.2 de Kstars n'est pas dispo pour Ubuntu 24.4 Cordialement Citer
m27trognondepomme Posté 31 août 2024 Posté 31 août 2024 @rmor51 peux-tu lancer ce script test_libgimp.py ( dans une console, taper: python test_libgimp.py ) et me renvoyer son affichage . Citer
keymlinux Posté 31 août 2024 Posté 31 août 2024 @m27trognondepomme Je viens de tester sur MacOS, cela ne marche pas. Voici le contenu du fichier trace: ('Library:', None) ('Library:', None) Traceback (most recent call last): File "/Users/stephane/pygap-m27/pythonfu/DeepSky_DarkSky.py", line 28, in <module> import gp2_func as gimp File "/Users/stephane/pygap-m27/gimp2/gp2_func.py", line 14, in <module> from libgimp2 import gimp2 File "/Users/stephane/pygap-m27/gimp2/libgimp2.py", line 31, in <module> gegl.gegl_init (None, None) File "/Applications/GIMP.app/Contents/Resources/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/__init__.py", line 379, in __getattr__ func = self.__getitem__(name) File "/Applications/GIMP.app/Contents/Resources/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/__init__.py", line 384, in __getitem__ func = self._FuncPtr((name_or_ordinal, self)) AttributeError: dlsym(RTLD_DEFAULT, gegl_init): symbol not found note: le nom des fichiers lib sur MacOS: libgimp-2.0.0.dylib libgegl-0.4.0.dylib Citer
rmor51 Posté 31 août 2024 Auteur Posté 31 août 2024 J'ai installe python-is-python3. Les plugins fonctionnent. Citation robert@robert-Studio-XPS-8000:~$ python test_libgimp.py python: can't open file '/home/robert/test_libgimp.py': [Errno 2] No such file or directory robert@robert-Studio-XPS-8000:~$ Voir davantage Citation obert@robert-Studio-XPS-8000:~/.config/GIMP/2.10/plug-ins/pygap-m27-master/gimp2$ python test libgimp2.py python: can't open file '/home/robert/.config/GIMP/2.10/plug-ins/pygap-m27-master/gimp2/test': [Errno 2] No such file or directory robert@robert-Studio-XPS-8000:~/.config/GIMP/2.10/plug-ins/pygap-m27-master/gimp2$ Voir davantage Citer
m27trognondepomme Posté 31 août 2024 Posté 31 août 2024 @keymlinux peux-tu lancer le script ci-dessus sur mac ? Citer
m27trognondepomme Posté 31 août 2024 Posté 31 août 2024 Le 31/08/2024 à 20:52, rmor51 a dit : J'ai installe python-is-python3. Les plugins fonctionnent. Voir davantage c'est la question que je t'avais posé hier Le 29/08/2024 à 21:02, m27trognondepomme a dit : as-tu fait "sudo apt-get install python-is-python3" ? Voir davantage Pour info, l'installation de ce paquet ne fait pas grand chose à part un lien symbolique: ln -s /usr/bin/python3 /usr/bin/python Citer
rmor51 Posté 31 août 2024 Auteur Posté 31 août 2024 Je l'avais installé avant la maj. Là, j'ai dû le réinstaller. Citer
keymlinux Posté 31 août 2024 Posté 31 août 2024 Le 31/08/2024 à 20:54, m27trognondepomme a dit : @keymlinux peux-tu lancer le script ci-dessus sur mac ? Voir davantage MLS-MBP-2:Downloads stephane$ python --version Python 2.7.16 MLS-MBP-2:Downloads stephane$ python ./test_libgimp.py ('LIBRARY GIMP: ', None) ('LIBRARY GELG: ', None) MLS-MBP-2:Downloads stephane$ python3 --version Python 3.12.4 MLS-MBP-2:Downloads stephane$ python3 ./test_libgimp.py LIBRARY GIMP: None LIBRARY GELG: None note: sur MacOS (Mojave 10.14) la commande "python" c'est la version 2.7, et il ne faut pas la changer car pas mal de scripts OS en dépendent. le python 3.12 a été installé en plus, "hors du contrôle de l'OS" Citer
m27trognondepomme Posté 1 septembre 2024 Posté 1 septembre 2024 Le 31/08/2024 à 20:52, rmor51 a dit : Citation robert@robert-Studio-XPS-8000:~$ python test_libgimp.py python: can't open file '/home/robert/test_libgimp.py': [Errno 2] No such file or directory robert@robert-Studio-XPS-8000:~$ Voir davantage Voir davantage @rmor51 il faut lancer le script là où tu l'a sauvé ou sinon lui indiquer son chemin. ( python 'chemin-du-fichier'/test_libgimp.py ) Citer
rmor51 Posté 1 septembre 2024 Auteur Posté 1 septembre 2024 Il y a un souci. Je n'ai pas de fichier libgimp.py, seulement un libgimp2.py. Ensuite la syntaxe python test_libgimp2.py n'est pas correcte, test libgimp2.py non plus. Citer
m27trognondepomme Posté 1 septembre 2024 Posté 1 septembre 2024 @rmor51 laisses tomber : ton problème est résolu avec l'installation python-is-python3. Citer
m27trognondepomme Posté 1 septembre 2024 Posté 1 septembre 2024 @keymlinux peux-tu essayer cette version sur ton mac : pygap-m27-loadlibrary.zip Citer
keymlinux Posté 1 septembre 2024 Posté 1 septembre 2024 Test effectué, en échec une fois gimp lancé, le menu "pyGapM27" contient une seule entrée: "_ErrorLibrary_" contenu du fichier trace Library GIMP and GELG is not found error registering GapM27InitMenu: Library GIMP and GELG is not found Library GIMP and GELG is not found error registering GapM27StackLayers: Library GIMP and GELG is not found Library GIMP and GELG is not found error registering GapM27SplitChannels2: Library GIMP and GELG is not found Library GIMP and GELG is not found error registering GapM27Moveto: Library GIMP and GELG is not found Library GIMP and GELG is not found error registering GapM27MergeChannels: Library GIMP and GELG is not found Library GIMP and GELG is not found error registering GapM27MergeLayers: Library GIMP and GELG is not found Library GIMP and GELG is not found error registering GapM27MaskLayer: Library GIMP and GELG is not found Library GIMP and GELG is not found error registering GapM27LayerDivideFlat2: Library GIMP and GELG is not found Library GIMP and GELG is not found error registering GapM27ImageDebayerise2: Library GIMP and GELG is not found Library GIMP and GELG is not found error registering GapM27ImageBayerise2: Library GIMP and GELG is not found Library GIMP and GELG is not found error registering GapM27HistoView: Library GIMP and GELG is not found Library GIMP and GELG is not found error registering GapM27GridSelection: Library GIMP and GELG is not found Library GIMP and GELG is not found error registering GapM27GetStatisticImage: Library GIMP and GELG is not found Library GIMP and GELG is not found error registering GapM27SolarDiskGraduation: Library GIMP and GELG is not found Library GIMP and GELG is not found error registering GapM27SelectSolarDisk: Library GIMP and GELG is not found Library GIMP and GELG is not found error registering GapM27ProtuberanceMask: Library GIMP and GELG is not found Library GIMP and GELG is not found error registering GapM27ProtuberanceBackground: Library GIMP and GELG is not found Library GIMP and GELG is not found error registering GapM27GridDrawingSun: Library GIMP and GELG is not found Library GIMP and GELG is not found error registering GapM27ColorizeProtuberance: Library GIMP and GELG is not found Library GIMP and GELG is not found error registering GapM27ColorizeKLineSun: Library GIMP and GELG is not found Library GIMP and GELG is not found error registering GapM27ColorizeSunSeq: Library GIMP and GELG is not found Library GIMP and GELG is not found error registering GapM27ColorizeHbetaSun: Library GIMP and GELG is not found Library GIMP and GELG is not found error registering GapM27ColorizeHalphaSun: Library GIMP and GELG is not found Library GIMP and GELG is not found error registering GapM27ColorizeContinuumSun: Library GIMP and GELG is not found Library GIMP and GELG is not found error registering GapM27ColorizeSun: Library GIMP and GELG is not found Library GIMP and GELG is not found error registering GapM27AddEarth: Library GIMP and GELG is not found Library GIMP and GELG is not found error registering GapM27JovianDiskGraduation: Library GIMP and GELG is not found Library GIMP and GELG is not found error registering GapM27TargetDrawing: Library GIMP and GELG is not found Library GIMP and GELG is not found error registering GapM27LunarDiskGraduation: Library GIMP and GELG is not found Library GIMP and GELG is not found error registering GapM27GridDrawingMoon: Library GIMP and GELG is not found Library GIMP and GELG is not found error registering GapM27HighPassFilter: Library GIMP and GELG is not found Library GIMP and GELG is not found error registering GapM27HighPass: Library GIMP and GELG is not found Library GIMP and GELG is not found error registering GapM27HFfilters: Library GIMP and GELG is not found error registering GapM27SimplifiedCartridge: Library GIMP and GELG is not found error registering GapM27Cartridge: Library GIMP and GELG is not found Library GIMP and GELG is not found error registering GapM27WhiteBalance: Library GIMP and GELG is not found Library GIMP and GELG is not found error registering GapM27SetNeutralSky: Library GIMP and GELG is not found Library GIMP and GELG is not found error registering GapM27SetDarkSky: Library GIMP and GELG is not found Library GIMP and GELG is not found error registering GapM27SetBlackPoint: Library GIMP and GELG is not found Library GIMP and GELG is not found error registering GapM27SetBackground: Library GIMP and GELG is not found Library GIMP and GELG is not found error registering GapM27ScaleImageBrightness: Library GIMP and GELG is not found Library GIMP and GELG is not found error registering GapM27PurgeRedSky: Library GIMP and GELG is not found Library GIMP and GELG is not found error registering GapM27PickStars: Library GIMP and GELG is not found Library GIMP and GELG is not found error registering GapM27Lsynth: Library GIMP and GELG is not found Library GIMP and GELG is not found error registering GapM27LRGBsharpen: Library GIMP and GELG is not found Library GIMP and GELG is not found error registering GapM27LRGB: Library GIMP and GELG is not found Library GIMP and GELG is not found error registering GapM27HaRGB: Library GIMP and GELG is not found Library GIMP and GELG is not found error registering GapM27HaLRGB: Library GIMP and GELG is not found Library GIMP and GELG is not found error registering GapM27GradientKiller: Library GIMP and GELG is not found Library GIMP and GELG is not found error registering GapM27EnhanceUsingSVD: Library GIMP and GELG is not found Library GIMP and GELG is not found error registering GapM27EnhanceStarsColours: Library GIMP and GELG is not found Library GIMP and GELG is not found error registering GapM27EnhanceStarLuminance: Library GIMP and GELG is not found Library GIMP and GELG is not found error registering GapM27EnhanceDynamicRange: Library GIMP and GELG is not found Library GIMP and GELG is not found error registering GapM27DarkSky: Library GIMP and GELG is not found Library GIMP and GELG is not found error registering GapM27DarkBalance: Library GIMP and GELG is not found Library GIMP and GELG is not found error registering GapM27ColorNoiseReduction: Library GIMP and GELG is not found Library GIMP and GELG is not found error registering GapM27ClipImageBrightness: Library GIMP and GELG is not found Library GIMP and GELG is not found error registering GapM27ColorAccent3: Library GIMP and GELG is not found Library GIMP and GELG is not found error registering GapM27ColorAccent2: Library GIMP and GELG is not found Library GIMP and GELG is not found error registering GapM27ColorAccent1: Library GIMP and GELG is not found Citer
m27trognondepomme Posté 1 septembre 2024 Posté 1 septembre 2024 @keymlinux j'ai fait une coquille dans la vérification de l'existence de la librairie. voi ci une version qui devrait corriger la coquille: pygap-m27-loadlibrary.zip Citer
keymlinux Posté 2 septembre 2024 Posté 2 septembre 2024 Le 01/09/2024 à 19:11, m27trognondepomme a dit : @keymlinux j'ai fait une coquille dans la vérification de l'existence de la librairie. voi ci une version qui devrait corriger la coquille: pygap-m27-loadlibrary.zip Voir davantage Test en échec avec les mêmes messages Citer
rmor51 Posté 3 septembre 2024 Auteur Posté 3 septembre 2024 Sur le forum GIMP, j'ai obtenu une solution. Elle consiste à charger une image app de GIMP qui tourne avec python 2.7. Super ! https://www.gimp-forum.net/Thread-new-gimp-2-10-38-appimages-with-python2?pid=39455#pid39455 Citer
Messages recommandés
Rejoignez la conversation !
Vous pouvez répondre maintenant et vous inscrire plus tard. Si vous avez un compte, connectez-vous pour poster avec votre compte.