在ubuntu中安装pyinterval [英] Installing pyinterval in ubuntu

查看:183
本文介绍了在ubuntu中安装pyinterval的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试安装python库pyinterval.它需要我没有错误安装的crlibm C头文件,但这似乎是问题的根源.

I am trying to install the python library pyinterval. It requires the crlibm C headers which I have installed without error, but seem to be at the root of the problem.

当我跑步时:

$ sudo easy_install pyinterval

我得到以下信息:

Searching for pyinterval
Reading http://pypi.python.org/simple/pyinterval/
Reading http://pyinterval.googlecode.com/
Best match: pyinterval 1.0b21
Downloading http://pypi.python.org/packages/source/p/pyinterval/pyinterval-1.0b21.tar.gz#md5=a65fe9855d3b6b0a9ddcc5b2f1e1e421
Processing pyinterval-1.0b21.tar.gz
Running pyinterval-1.0b21/setup.py -q bdist_egg --dist-dir /tmp/easy_install-K58WK9/pyinterval-1.0b21/egg-dist-tmp-Tp03Mb
ext/crlibmmodule.c: In function ‘crlibm_cospi_rn’:
ext/crlibmmodule.c:45:1: warning: implicit declaration of function ‘cospi_rn’
ext/crlibmmodule.c: In function ‘crlibm_cospi_ru’:
ext/crlibmmodule.c:45:1: warning: implicit declaration of function ‘cospi_ru’
...
ext/crlibmmodule.c: In function ‘crlibm_log1p_rz’:
ext/crlibmmodule.c:59:1: warning: implicit declaration of function ‘log1p_rz’
/usr/bin/ld: /usr/local/lib/libcrlibm.a(addition_scs.o): relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libcrlibm.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
error: Setup script exited with error: command 'gcc' failed with exit status 1

我给:

$ sudo apt-get install python-all-dev

并不能解决问题.

推荐答案

如果仍然有人对此有疑问,则需要在"scs_lib/Makefile"(而不是"./Makefile")中设置"CPPFLAGS = -fPIC".

In case anyone still has problems with this, you need to set "CPPFLAGS = -fPIC" in "scs_lib/Makefile", not "./Makefile".

这篇关于在ubuntu中安装pyinterval的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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