2012-03-07 2 views
4

python 라이브러리 pyinterval을 설치하려고합니다. 오류없이 설치 한 crlibm C 헤더가 필요하지만 문제의 근원 인 것 같습니다.우분투에 pyinterval 설치

내가 실행할 때 : I가 호출 한

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 

을하고 그래도 문제가 해결되지 않은

$ sudo easy_install pyinterval 

나는 다음과 같은 얻을.

답변

3

누구나 여전히이 문제가 발생하는 경우 "./Makefile"이 아닌 "scs_lib/Makefile"에 "CPPFLAGS = -fPIC"를 설정해야합니다.

1

같은 문제가 있었는데 문제가 crlibm (플래그 -fPIC이 오류에 언급되어 있음)에서 발견되었습니다.

원본에서 crlibm 설치가 끝나고 설치 작업을 수행 할 수있었습니다. crlibm에 대해 ./configure를 실행하면 "CPPFLAGS ="를 "CPPFLAGS = -fPIC"로 변경하여 Makefile을 수동으로 편집했습니다. 여기에서 "make", "make install", "sudo easy_install pyinterval"을 실행했습니다.

나는이 솔루션에 100 % 자신감이 없다고 덧붙이고, 그다지 우아하지 않다. -fPIC 플래그의 기술적 인 세부 사항에 대해 확신 할 수 없으며 실제로 어떤 영향을 미치는지 알 수 없습니다.

하지만 제대로 작동합니다.

+0

정말 고마워요. 그게 효과가있어! 나는 새로운 질문을 게시하기 때문에 거의 모든 희망을 버렸다. :-D –

0

위의 제안 사항을 사용하여 우분투 12.10에 pyinterval을 설치하기 만했습니다.

scs_lib Makefile에서 CPPFLAGS에 -fPIC를 추가하려고했지만 작동하지 않았습니다. crlibm의 최신 버전 (1.0beta-4 사용)은 crlibm_private.o도 -fPIC로 컴파일해야하므로 기본 디렉토리의 Makefile에 CPPFLAGS에 플래그를 추가해야합니다.

1

작동하는 것 같습니다. 나를 위해 괜찮아 :

wget http://lipforge.ens-lyon.fr/frs/download.php/152/crlibm-1.0beta3.tar.gz 
tar vfxz crlibm-1.0beta3.tar.gz 
cd crlibm-1.0beta3 
export CPPFLAGS=-fPIC 
./configure 
make 
sudo make install 
sudo pip install pyinterval 
python 
>>> from interval import * 

답해 주셔서 감사합니다.

+0

그것은 나를 위해 일했다! 감사!!! – Geparada

관련 문제