gpt4 book ai didi

python - 在 ubuntu 中安装 pyinterval

转载 作者:太空狗 更新时间:2023-10-30 02:49:08 25 4
gpt4 key购买 nike

我正在尝试安装 python 库 pyinterval。它需要我已正确安装的 crlibm C header ,但似乎是问题的根源。

当我运行时:

$ 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”。

关于python - 在 ubuntu 中安装 pyinterval,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9608471/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com