【问题标题】:Error installing mply library. Fatal error: gsl/gsl_sf.h: No such file or directory安装 mply 库时出错。致命错误:gsl/gsl_sf.h:没有这样的文件或目录
【发布时间】:2018-10-25 03:19:10
【问题描述】:

我正在尝试在 xubuntu (ubuntu 17.10) 上安装最新版本的 mply (3.5.0):

  1. 下载.tar.gz
  2. 解压
  3. python setup.py build。这里我得到了下面显示的错误

  4. 也试过直接python setup.py install。同样的错误。

  5. 尝试通过下载最新版本并按照https://coral.ise.lehigh.edu/jild13/2016/07/11/hello/ 中的所有步骤安装gsl 库。我把它安装在/home/gsl
  6. 还是一样的错误
  7. 尝试了各种其他安装(sudo apt-get install libgsl0ldblsudo apt-get install libgs123sudo apt-get install libgsl0-dev)。没有任何效果。
  8. 尝试将文件夹 /home/gsl/include/gsl 复制到 mply-3.5.0/mply/gsl 文件夹中。这会稍微改变一些东西,因为现在我遇到了致命错误:gsl/gsl_sf_result.h: No such file or directory(所以它找到了gsl_sf.h,但没有找到gsl_sf_result.h(这两个文件都存在于/gsl/include/gsl 文件夹中)。
  9. 试过了 python setup.py build_ext --include-dirs=/home/gls/include/gls 还是什么都没有
  10. 试图在我的/usr/local/include 中复制/home/gsl/include/gsl 文件夹:

    cp -R /home/gsl/include/gsl /usr/local/include/gsl 还是什么都没有。

救命!

错误信息:

gcc -pthread -B /home/lorenzo/anaconda3/compiler_compat 
  -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall 
  -Wstrict-prototypes -fPIC -I/home/lorenzo/anaconda3/include/python3.6m 
  -I/home/lorenzo/anaconda3/lib/python3.6/site-packages/numpy/core/include 
  -I/home/lorenzo/anaconda3/include/python3.6m -c mlpy/gsl/gsl.c 
  -o build/temp.linux-x86_64-3.6/mlpy/gsl/gsl.o
mlpy/gsl/gsl.c:223:10: fatal error: gsl/gsl_sf.h: No such file or directory
#include "gsl/gsl_sf.h"

【问题讨论】:

  • 您的系统上是否安装了“gsl”的开发包?
  • Related to this,如果不是重复的话。
  • 我已经安装了 libgsl-dev。
  • 而且,我已经尝试过该链接中的建议,但没有任何效果。
  • 那么find / -name gsl_sf.h 告诉你什么?

标签: python c++ c linux


【解决方案1】:

通过使用 conda 重新安装 gsl 库解决: conda install gsl

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-11-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-02-27
    • 1970-01-01
    • 1970-01-01
    • 2016-05-04
    相关资源
    最近更新 更多