TopologyLayer icon indicating copy to clipboard operation
TopologyLayer copied to clipboard

ImportError: /home/rd4/.conda/envs/jmlr/lib/python3.7/site-packages/topologylayer/functional/persistence.cpython-37m-x86_64-linux-gnu.so: undefined symbol: _ZN3c105ErrorC1ENS_14SourceLocationERKSs

Open changshuowang opened this issue 4 years ago • 3 comments

Hello, after I installed it, I encountered a problem in the process of running the program:

(jmlr) [rd4@localhost levelset]$ python noisy_circle.py Traceback (most recent call last): File "noisy_circle.py", line 3, in from topologylayer.nn import LevelSetLayer2D, SumBarcodeLengths, PartialSumBarcodeLengths File "/home/rd4/.conda/envs/jmlr/lib/python3.7/site-packages/topologylayer/init.py", line 1, in import topologylayer.nn File "/home/rd4/.conda/envs/jmlr/lib/python3.7/site-packages/topologylayer/nn/init.py", line 3, in from .levelset import LevelSetLayer, LevelSetLayer1D, LevelSetLayer2D File "/home/rd4/.conda/envs/jmlr/lib/python3.7/site-packages/topologylayer/nn/levelset.py", line 1, in from ..functional.sublevel import SubLevelSetDiagram File "/home/rd4/.conda/envs/jmlr/lib/python3.7/site-packages/topologylayer/functional/sublevel.py", line 6, in from .persistence import SimplicialComplex, persistenceForwardCohom, persistenceBackward, persistenceForwardHom ImportError: /home/rd4/.conda/envs/jmlr/lib/python3.7/site-packages/topologylayer/functional/persistence.cpython-37m-x86_64-linux-gnu.so: undefined symbol: _ZN3c105ErrorC1ENS_14SourceLocationERKSs ----------------------------------------------------------------------------------------------My environment is GCC 7.3.0 cudatoolkit 9.2
cudnn 7.6.5
numpy 1.18.1
python 3.7.7 pytorch 1.2.0 torchvision 0.4.0 scipy 1.4.1

Can you help me solve it? Thanks!

changshuowang avatar Apr 29 '20 17:04 changshuowang

Hi! Thanks for sharing. Are you using MacOS?

bruel-gabrielsson avatar May 09 '20 10:05 bruel-gabrielsson

I am also encountering the same error with the following specifications: numpy==1.16.4 scipy==1.2.1 torch==1.1.0 python3.6.8 centos 4.18.0-193.28.1.el8_2.x86_64 gcc-c++-8.3.1-5.el8.0.2.x86_64 I built from source using python setup.py install --record files.txt Could you please help?

yvonna-li avatar Mar 31 '21 17:03 yvonna-li

I also had the error reported by @changshuowang on Ubuntu 21.10. Here are two setups that show the error and one that works. After installing the requirements with conda, I installed topologylayer with pip.

Error setup (1), requirements.yml: channels:

  • pytorch
  • defaults
  • conda-forge

dependencies:

  • cudatoolkit=11.3.1
  • matplotlib=3.4.3
  • numpy=1.21.2
  • python=3.9.7
  • pytorch=1.9.0
  • scipy=1.7.1

resulting in the following package versions:

  • _libgcc_mutex=0.1=main
  • _openmp_mutex=4.5=1_gnu
  • cpuonly=1.0=0
  • cudatoolkit=11.3.1=h2bc3f7f_2
  • libgcc-ng=9.3.0=h5101ec6_17
  • libgomp=9.3.0=h5101ec6_17
  • libstdcxx-ng=9.3.0=hd4cf53a_17
  • pytorch=1.9.0=py3.9_cpu_0

Error: >> import topologylayer ImportError: /path/to/environment/lib/python3.9/site-packages/ topologylayer/functional/persistence.cpython-39-x86_64-linux-gnu.so: undefined symbol: _ZNSt15__exception_ptr13exception_ptr10_M_releaseEv

Error setup (2), requirements.yml (with versions as specified in the requirements file of this repository): channels:

  • pytorch
  • defaults
  • conda-forge

dependencies:

  • matplotlib
  • numpy=1.16.4
  • pytorch=1.1.0
  • scipy=1.2.1
  • torchvision

resulting in the following package versions:

  • _libgcc_mutex=0.1=main
  • _openmp_mutex=4.5=1_gnu
  • cudatoolkit=10.0.130=0
  • libgcc-ng=9.3.0=h5101ec6_17
  • libgomp=9.3.0=h5101ec6_17
  • libstdcxx-ng=9.3.0=hd4cf53a_17
  • python=3.7.11=h12debd9_0
  • pytorch=1.1.0=py3.7_cuda10.0.130_cudnn7.5.1_0

Error: >> import topologylayer ImportError: /path/to/environment/lib/python3.7/site-packages/ topologylayer/functional/persistence.cpython-37m-x86_64-linux-gnu.so: undefined symbol: _ZNSt15__exception_ptr13exception_ptr10_M_releaseEv

Working setup, requirements.yml: channels:

  • pytorch
  • defaults
  • conda-forge

dependencies:

  • cudatoolkit=11.1.1
  • matplotlib=3.4.3
  • numpy=1.21.2
  • python=3.9.7
  • pytorch=1.9.0
  • scipy=1.7.1

resulting in the following package versions:

  • _libgcc_mutex=0.1=conda_forge
  • _openmp_mutex=4.5=1_llvm
  • cudatoolkit=11.1.1=h6406543_9
  • libgcc-ng=11.2.0=h1d223b6_11
  • libstdcxx-ng=11.2.0=he4da1e4_11
  • llvm-openmp=12.0.1=h4bd325d_1
  • pytorch=1.9.0=py3.9_cuda11.1_cudnn8.0.5_0

heitere avatar Dec 09 '21 09:12 heitere