在Mac 10.9上安装mlpy 3.5.0错误.请帮助我 [英] install mlpy 3.5.0 on mac 10.9 error.Please help me

查看:135
本文介绍了在Mac 10.9上安装mlpy 3.5.0错误.请帮助我的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以下是我得到的错误.请帮我修复它.

THe following is my error which i am getting. Please help me to fix it.

apple:mlpy-3.5.0 apple$ python setup.py install
running install
running build
running build_py
running build_ext
building 'mlpy.gsl' extension
cc -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -Qunused-arguments -Qunused-arguments -arch x86_64 -arch i386 -pipe -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c mlpy/gsl/gsl.c -o build/temp.macosx-10.9-intel-2.7/mlpy/gsl/gsl.o
mlpy/gsl/gsl.c:223:10: fatal error: 'gsl/gsl_sf.h' file not found
#include "gsl/gsl_sf.h"
         ^
1 error generated.

推荐答案

我今天在安装mlpy时遇到了同样的问题.基于mlpy文档.这是解决此问题的方法.

I am actually getting the same issue today while installing mlpy. Based on the mlpy documentation. Here is the method to solve this issue.

根据mlpy文档中的安装"部分:

According to the installation section in the mlpy documentation:

如果GSL头文件或共享库位于系统上的非标准位置,请使用--include-dirs 和--rpath选项来build_ext:

If the GSL header files or shared library are in non-standard locations on your system, use the --include-dirs and --rpath options to build_ext:

$ python setup.py build_ext --include-dirs =/path/to/header --rpath =/path/to/lib

$ python setup.py build_ext --include-dirs=/path/to/header --rpath=/path/to/lib

$ python setup.py install

$ python setup.py install

我们必须分配标题和库.基于如何获取和安装GSL

We have to assign the header and lib. Based on How to obtain and install GSL,

在搜索路径/标题搜索路径"下,键入/opt/local/include

Under Search Paths/Header Search Paths type /opt/local/include

在搜索路径/库搜索路径"下,键入/opt/local/lib

Under Search Paths/Library Search Paths type /opt/local/lib

快速答案是运行以​​下命令:

sudo python setup.py build_ext --include-dirs =/opt/local/include --rpath =/opt/local/lib

sudo python setup.py build_ext --include-dirs=/opt/local/include --rpath=/opt/local/lib

sudo python setup.py安装

sudo python setup.py install

希望这会有所帮助.

这篇关于在Mac 10.9上安装mlpy 3.5.0错误.请帮助我的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆