Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Plugin to integrate Gimp with Meta Segment Anything
#19
Hello khemadeva

After installing your new version of the code, I sent the logging output to a file.
There is still an issue, but as you can see below it is a more "basic" issue with numpy (multiarray) import in the python 2.7 in python-fu module.

Not sure how to fix that. "import numpy" works fine in the interactive python-fu console.

The file /Applications/GIMP.app/Contents/Resources/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/_multiarray_umath.so is present. 

Messages put in the logging file
Quote:2023-12-17 07:08:03 - DEBUG - pythonPath: /Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9
2023-12-17 07:08:11 - INFO - Running command: /Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9 /Users/efe/Library/Application Support/GIMP/2.10/plug-ins/seganybridge.py vit_h /Users/efe/DeepInDepth/SAM/sam_vit_h_4b8939.pth /var/folders/38/hws16c9j0qbfm9_r3t900slw0000gn/T/__seg__o4y3wV.png Box Single /var/folders/38/hws16c9j0qbfm9_r3t900slw0000gn/T/__seg__mask__ True sel_place_holder 223,156,871,618
2023-12-17 07:08:16 - ERROR - Command failed with the following error:
 Traceback (most recent call last):
  File "/Applications/GIMP.app/Contents/Resources/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/__init__.py", line 40, in <module>
    from . import multiarray
  File "/Applications/GIMP.app/Contents/Resources/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/multiarray.py", line 13, in <module>
    from . import overrides
  File "/Applications/GIMP.app/Contents/Resources/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/overrides.py", line 6, in <module>
    from numpy.core._multiarray_umath import (
ImportError: dlopen(/Applications/GIMP.app/Contents/Resources/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/_multiarray_umath.so, 2): Library not loaded: @rpath/lib/libopenblas-r1.dylib
  Referenced from: /Applications/GIMP.app/Contents/Resources/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/_multiarray_umath.so
  Reason: image not found

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/efe/Library/Application Support/GIMP/2.10/plug-ins/seganybridge.py", line 25, in <module>
    import torch
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/torch/__init__.py", line 1120, in <module>
    from .storage import _StorageBase, TypedStorage, _LegacyStorage, UntypedStorage, _warn_typed_storage_removal
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/torch/storage.py", line 14, in <module>
    import numpy as np
  File "/Applications/GIMP.app/Contents/Resources/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/__init__.py", line 142, in <module>
    from . import core
  File "/Applications/GIMP.app/Contents/Resources/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/__init__.py", line 71, in <module>
    raise ImportError(msg)
ImportError: 

IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!

Importing the multiarray numpy extension module failed.  Most
likely you are trying to import a failed build of numpy.
Here is how to proceed:
- If you're working with a numpy git repository, try git clean -xdf
  (removes all files not under version control) and rebuild numpy.
- If you are simply trying to use the numpy version that you have installed:
  your installation is broken - please reinstall numpy.
- If you have already reinstalled and that did not fix the problem, then:
  1. Check that you are using the Python you expect (you're using /Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9),
     and that you have no directories in your PATH or PYTHONPATH that can
     interfere with the Python and numpy versions you're trying to use.
  2. If (1) looks fine, you can open a new issue at
     https://github.com/numpy/numpy/issues.  Please include details on:
     - how you installed Python
     - how you installed numpy
     - your operating system
     - whether or not you have multiple versions of Python installed
     - if you built from source, your compiler versions and ideally a build log

     Note: this error has many possible causes, so please don't comment on
     an existing issue about this - open a new one instead.

Original error was: dlopen(/Applications/GIMP.app/Contents/Resources/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/_multiarray_umath.so, 2): Library not loaded: @rpath/lib/libopenblas-r1.dylib
  Referenced from: /Applications/GIMP.app/Contents/Resources/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/_multiarray_umath.so
  Reason: image not found
Reply


Messages In This Thread
RE: Plugin to integrate Gimp with Meta Segment Anything - by LeafAtWood - 12-17-2023, 06:22 AM

Forum Jump: