pmelchior / scarlet

hyperspectral galaxy modeling and deblending
MIT License
49 stars 22 forks source link

import error for operators_pybind11.cpython-39-x86_64-linux-gnu.so #259

Closed dhalvor closed 2 years ago

dhalvor commented 2 years ago

Am trying to install scarlet but every time I try to import the library in a python script I will get this error: `In [1]: import scarlet

ImportError Traceback (most recent call last)

in ----> 1 import scarlet ~/scarlettest/src/scarlet/scarlet/__init__.py in 1 from .bbox import Box ----> 2 from .blend import Blend 3 from .component import Component, FactorizedComponent, CubeComponent, CombinedComponent 4 from .constraint import ( 5 Constraint, ~/scarlettest/src/scarlet/scarlet/blend.py in 8 import logging 9 ---> 10 from .component import CombinedComponent 11 from .model import UpdateException 12 ~/scarlettest/src/scarlet/scarlet/component.py in 7 from .bbox import Box, overlapped_slices 8 from .fft import fast_zero_pad ----> 9 from .morphology import Morphology 10 from .spectrum import Spectrum 11 ~/scarlettest/src/scarlet/scarlet/morphology.py in 18 from .wavelet import Starlet, starlet_reconstruction, get_multiresolution_support 19 from . import fft ---> 20 from . import initialization 21 22 ~/scarlettest/src/scarlet/scarlet/initialization.py in 4 from .bbox import Box 5 from .cache import Cache ----> 6 from .renderer import NullRenderer, ConvolutionRenderer 7 8 ~/scarlettest/src/scarlet/scarlet/renderer.py in 7 from . import fft 8 from .bbox import Box, overlapped_slices ----> 9 from scarlet.operators_pybind11 import apply_filter 10 11 ImportError: /home/daniel/scarlettest/src/scarlet/scarlet/operators_pybind11.cpython-39-x86_64-linux-gnu.so: undefined symbol: _ZNSt15__exception_ptr13exception_ptr10_M_releaseEv ` I'm not very familiar with pybind11 or C++ so am unsure how to remedy this error. Any help would be much appreciated.
herjy commented 2 years ago

This looks lot like issue #251 at first glance. We've had similar errors when trying to import from within the scarlet repo. Please make sure you are currently outside the scarlet repo.

dhalvor commented 2 years ago

Unfortunately no, I get this error when trying to import from a different directory to the scarlet repo.

herjy commented 2 years ago

I have read that C++ symbol issue could be a version problem. If you are on a conda environment, this might fix the issue: conda update libgcc. If this does not work, could you please specify what specific versions of python, git, etc... you are using?

dhalvor commented 2 years ago

Ah so i tried to update but it told be I didn't have libgcc installed. Upon installing that and then re-installing scarlet I am now able to import it. This is awesome, thank you.