Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Importing underscore modules (undefined symbol) #246

Open
mjyb16 opened this issue Sep 28, 2023 · 2 comments
Open

Importing underscore modules (undefined symbol) #246

mjyb16 opened this issue Sep 28, 2023 · 2 comments

Comments

@mjyb16
Copy link

mjyb16 commented Sep 28, 2023

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!

@mjyb16 mjyb16 changed the title Importing underscore modules Importing underscore modules (undefined symbol) Sep 28, 2023
@gmloose
Copy link
Collaborator

gmloose commented Sep 29, 2023

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.

@mjyb16
Copy link
Author

mjyb16 commented Sep 29, 2023

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants