Skip to content

Importing underscore modules (undefined symbol) #246

Open

Description

@mjyb16

When I attempt to import any function, I get the following type of error:
ModuleNotFoundError: No module named 'casacore.tables._tables'

EDIT: After recompiling with pip install . using github as source, I no longer have the error above, but I still have an import error with undefined symbol:

>>> from casacore.tables import table Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/mjybarth/envs/resolve/lib/python3.8/site-packages/casacore/tables/__init__.py", line 60, in <module> from .msutil import * File "/home/mjybarth/envs/resolve/lib/python3.8/site-packages/casacore/tables/msutil.py", line 29, in <module> from casacore.tables.table import (table, taql, File "/home/mjybarth/envs/resolve/lib/python3.8/site-packages/casacore/tables/table.py", line 40, in <module> from ._tables import (Table, ImportError: /home/mjybarth/envs/resolve/lib/python3.8/site-packages/casacore/tables/_tables.cpython-38-x86_64-linux-gnu.so: undefined symbol: _ZN5boost6python6detail12gcc_demangleEPKc

EDIT 2: This occurs even if I use pip install python-casacore (ie with wheels). Note that I provide pip with the directories to Boost and casacore via :
export LD_LIBRARY_PATH=/cvmfs/soft.computecanada.ca/easybuild/software/2020/avx512/Compiler/intel2020/boost/1.80.0/lib:/home/mjybarth/casa/usr/local/lib

Please let me know how to resolve this issue!

Activity

  1. changed the title [-]Importing underscore modules[/-] [+]Importing underscore modules (undefined symbol)[/+] on Sep 28, 2023
  2. gmloose commented on Sep 29, 2023

    @gmloose
    Collaborator

    From your description it is not clear if you try to install from source or not. The recommended way to install python-casacore is to simply run

    pip install python-casacore
    

    Make sure that you do not have casacore or python-casacore installed from your package manager, or from a local build. These are almost certain to conflict with the version that pip will install. Also, it is strongly recommended to install python-casacore in a Python virtual environment.

  3. mjyb16 commented on Sep 29, 2023

    @mjyb16
    Author

    Hi, apologies for the unclear description. I have tried both ways of installing and neither worked (I uninstalled in between). I will try a fresh environment at some point, since the existing installation of casacore must have been conflicting with the install of python-casacore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions