我正在尝试运行以下代码:
import pymc as pm
alpha = 1.0/count_data.mean() #count_data is the variable that holds txtc
lambda_1 = pm.Exponential("lambda_1", alpha)
lambda_2 = pm.Exponential("lambda_2", alpha)
tau = pm.DiscreteUniform("tau", lower=0, upper=n_count_data)
并不断收到此错误:
RuntimeError: module compiled against API version 9 but this version of numpy is 6
Traceback (most recent call last):
File "bayestest.py", line 1, in <module>
import pymc as pm
File "/Library/Python/2.7/site-packages/pymc-2.3-py2.7-macosx-10.8-intel.egg/pymc/__init__.py", line 29, in <module>
from .CommonDeterministics import *
File "/Library/Python/2.7/site-packages/pymc-2.3-py2.7-macosx-10.8- intel.egg/pymc/CommonDeterministics.py", line 21, in <module>
from .utils import safe_len, stukel_logit, stukel_invlogit, logit, invlogit, value, find_element
文件“/Library/Python/2.7/site-packages/pymc-2.3-py2.7-macosx-10.8-intel.egg/pymc/utils.py”,第 14 行,来自 . import flib ImportError: numpy.core.multiarray 导入失败
我的库安装版本有问题吗?