square / pysurvival

Open source package for Survival Analysis modeling
https://www.pysurvival.io/
Apache License 2.0
347 stars 107 forks source link

Error message : ImportError: dlopen, ... Symbol not found... #31

Open azephyrr opened 3 years ago

azephyrr commented 3 years ago

Hi, When I try to copy the code and run it from the tutorial page https://square.github.io/pysurvival/tutorials/credit_risk.html , the pysurvival package is successfully installed. But when I run this code:

from pysurvival.utils.display import correlation_matrix

it shows the error message as follow:

ImportError: dlopen(/Users/ju/opt/anaconda3/lib/python3.7/site-packages/pysurvival/models/_non_parametric.cpython-37m-darwin.so, 2): Symbol not found: ZNSt7cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_MassignERKS4 Referenced from: /Users/ju/opt/anaconda3/lib/python3.7/site-packages/pysurvival/models/_non_parametric.cpython-37m-darwin.so Expected in: /usr/lib/libstdc++.6.dylib in /Users/ju/opt/anaconda3/lib/python3.7/site-packages/pysurvival/models/_non_parametric.cpython-37m-darwin.so

After that, I have uninstalled and reinstalled pysurvival several times from either Spider/Anaconda or command line, it was still failed.

My laptop is MacBook Pro (13-inch, 2019, Two Thunderbolt 3 ports), version 10.15.7 (19H2) IDE: Spyder

How can I solve it? Thank you!

lianyi commented 3 years ago

running into the same problem.

My Mac is Mac OS Catalina 10.15.7

lianyi commented 3 years ago

Update: My problem was fixed by creating a new conda env with python=3.8.5, hope that helps.