我可以成功安装python软件包,但无法导入。找不到符号。预期在:

时间:2019-12-30 17:12:02

标签: python-3.x gcc pip jupyter-notebook homebrew

我使用自制软件,pip和gcc成功安装了pysurvival,但是当我尝试将pysurvival导入jupyter笔记本中时,

import pysurvival
from pysurvival.models.simulations import SimulationModel
from pysurvival.models.survival_forest import 
ConditionalSurvivalForestModel

我收到此错误:

ImportError: 
dlopen(/usr/local/Cellar/jupyterlab/1.2.4/libexec/lib/python3.7/site-packages/pysurvival/models/_survival_forest.cpython-37m-darwin.so, 2): 
Symbol not found: __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm
Referenced from: /usr/local/Cellar/jupyterlab/1.2.4/libexec/lib/python3.7/site-packages/pysurvival/models/_survival_forest.cpython-37m-darwin.so
Expected in: /usr/lib/libstdc++.6.dylib
in /usr/local/Cellar/jupyterlab/1.2.4/libexec/lib/python3.7/site-packages/pysurvival/models/_survival_forest.cpython-37m-darwin.so

当我尝试时:

import pysurvival

没问题。

在编译C ++代码时,GCC和clang之间是否可能存在一些冲突? 我的操作系统是Mac OSX Catalina 10.15.1,我使用的是Python 3.7.4,但我的计算机上也存在Python 2.7。

0 个答案:

没有答案