我试图在python中测试this多线性回归的实现。它需要" statsmodels.api"但是当我尝试执行"导入statsmodels.api"时,我收到错误:
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/statsmodels/api.py in <module>()
16 from .duration.hazard_regression import PHReg
17 from .nonparametric import api as nonparametric
---> 18 from . import distributions
19 from .__init__ import test
20 from . import version
ImportError: cannot import name distributions
所以我尝试安装&#34;发行版&#34; pip打包:
$ pip install distributions
然而,它失败并出现了一个clang错误:
/usr/bin/clang++ -bundle -undefined dynamic_lookup -arch i386 -arch x86_64 -g build/temp.macosx-10.6-intel-2.7/distributions/lp/special.o -ldistributions_shared -lm -o build/lib.macosx-10.6-intel-2.7/distributions/lp/special.so
ld: library not found for -ldistributions_shared
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command '/usr/bin/clang++' failed with exit status 1
我已经尽力弄清楚-ldistrbutions_shared是什么,但我似乎无法弄清楚。
当我尝试更新xcode时没有运气。我所有的互联网搜索都无法帮助我解决这个问题。任何帮助将不胜感激!
BTW,我正在运行OSX 10.10.5并使用Python 2.7