python - pip安装scikit-learn时 "ld: library not found for -lc++"

标签 python c++ scikit-learn osx-yosemite libc++

我正在尝试 pip install scikit-learn,但出现此错误:

$ pip install scikit-learn

g++ -bundle -undefined dynamic_lookup -arch i386 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.6.sdk -isysroot /Developer/SDKs/MacOSX10.6.sdk -g -Wall -undefined dynamic_lookup -bundle -arch i386 -arch x86_64 -arch i386 -arch x86_64 build/temp.macosx-10.6-x86_64-2.7/sklearn/svm/libsvm.o -Lbuild/temp.macosx-10.6-x86_64-2.7 -llibsvm-skl -o build/lib.macosx-10.6-x86_64-2.7/sklearn/svm/libsvm.so

ld: library not found for -lc++

clang: error: linker command failed with exit code 1 (use -v to see invocation)

我已经成功安装了 numpy 和 scipy。

我在 Mac OSX Yosemite 上下载了最新版本的 XCode,希望它能解决 c 编译问题。

最佳答案

我最终升级了 pip,一切都很好。

pip install -U pip

但 Anaconda 看起来真的很酷,我可能也会研究一下。谢谢!

关于python - pip安装scikit-learn时 "ld: library not found for -lc++",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29543371/

相关文章:

c++ - 使用双指针创建树

C++ - 仅使用无符号整数实现快速排序?

python - xgboost.XGBClassifier 中可用的目标函数有哪些不同选项?

python - 随机森林准确率太低

python - 为什么 Python 的 Event.wait() 可以在某些系统上被信号中断,而在其他系统上却不能?

python - 划分数据框列: TypeError: 'int' object is not iterable

C++/SDL : Fading out a surface already having per-pixel alpha information

基于 Sublime Text 3 的 Python 2.7 不打印 '\uFFFD' 字符

python - Mechanize :列出所有可能的控制值

python - 在 sklearn 中拟合多项式回归曲线时遇到问题