2016-07-04 1 views
0

AWS Ubuntu에서 제품을 생산할 때 Fabric을 사용하고 싶습니다. 나는 패브릭에 대해 읽을 때, 파이썬 2.5 ~ 2.7 필요한, 그래서 맥 OS X에 파이썬 VIRTUALENV를 만듭니다pyenv에 패브릭 오류를 설치하십시오.

pyenv virtualenv 2.7.5 fabric 
mkdir fabric 

나는

(fabric)fabric $ pip install fabric 

pip install fabric를 실행하지만이 오류

Collecting fabric 

[...] 

configure: creating ./config.status 
config.status: creating src/config.h 
building 'Crypto.PublicKey._fastmath' extension 
creating build/temp.macosx-10.11-x86_64-2.7 
creating build/temp.macosx-10.11-x86_64-2.7/src 
clang -fno-strict-aliasing -fwrapv -Wall -Wstrict-prototypes -std=c99 -O3 -fomit-frame-pointer -Isrc/ -I/usr/include/ -I/Users/hanminsoo/.pyenv/versions/2.7.5/include/python2.7 -c  
src/_fastmath.c -o build/temp.macosx-10.11-x86_64-2.7/src/_fastmath.o 
src/_fastmath.c:1545:20: warning: comparison of unsigned expression < 0  is always false [-Wtautological-compare] 
         else if (result < 0) 
           ~~~~~~^~ 
src/_fastmath.c:1621:20: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare] 
         else if (result < 0) 
           ~~~~~~^~ 
2 warnings generated. 
clang -bundle -bundle_loader python.exe -L/usr/local/opt/readline/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/openssl/lib -L/Users/hanminsoo/.pyenv/versions/2.7.5/lib build/temp.macosx-10.11-x86_64-2.7/src/_fastmath.o -lgmp -o build/lib.macosx-10.11-x86_64-2.7/Crypto/PublicKey/_fastmath.so 
ld: file not found: python.exe 
clang: error: linker command failed with exit code 1 (use -v to see invocation) 
error: command 'clang' failed with exit status 1 


------------------------------------------------------ 

Failed building wheel for pycrypto 
Running setup.py clean for pycrypto 
Failed to build pycrypto 

Installing collected packages: pycrypto, paramiko, fabric 
Running setup.py install for pycrypto ... error 

Complete output from command /Users/hanminsoo/.pyenv/versions/2.7.5/envs/fabric/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/private/var/folders/c5/d1_cb4j92f19h5q0_cbv7bpc0000gn/T/pip-build-vsA2vJ/pycrypto/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/c5/d1_cb4j92f19h5q0_cbv7bpc0000gn/T/pip-iE2TRI-record/install-record.txt --single-version-externally-managed --compile --install-headers /Users/hanminsoo/.pyenv/versions/2.7.5/envs/fabric/include/site/python2.7/pycrypto: 

clang -fno-strict-aliasing -fwrapv -Wall -Wstrict-prototypes -std=c99 -O3 -fomit-frame-pointer -Isrc/ -I/usr/include/ -I/Users/hanminsoo/.pyenv/versions/2.7.5/include/python2.7 -c src/_fastmath.c -o build/temp.macosx-10.11-x86_64-2.7/src/_fastmath.o 
src/_fastmath.c:1545:20: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare] 
         else if (result < 0) 
           ~~~~~~^~ 
src/_fastmath.c:1621:20: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare] 
         else if (result < 0) 
           ~~~~~~^~ 
2 warnings generated. 
clang -bundle -bundle_loader python.exe -L/usr/local/opt/readline/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/openssl/lib -L/Users/hanminsoo/.pyenv/versions/2.7.5/lib build/temp.macosx-10.11-x86_64-2.7/src/_fastmath.o -lgmp -o build/lib.macosx-10.11-x86_64-2.7/Crypto/PublicKey/_fastmath.so 
ld: file not found: python.exe 
clang: error: linker command failed with exit code 1 (use -v to see invocation) 
error: command 'clang' failed with exit status 1 

------------------------------------------------------- 

Command "/Users/hanminsoo/.pyenv/versions/2.7.5/envs/fabric/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/private/var/folders/c5/d1_cb4j92f19h5q0_cbv7bpc0000gn/T/pip-build-vsA2vJ/pycrypto/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/c5/d1_cb4j92f19h5q0_cbv7bpc0000gn/T/pip-iE2TRI-record/install-record.txt --single-version-externally-managed --compile --install-headers /Users/hanminsoo/.pyenv/versions/2.7.5/envs/fabric/include/site/python2.7/pycrypto" failed with error code 1 in /private/var/folders/c5/d1_cb4j92f19h5q0_cbv7bpc0000gn/T/pip-build-vsA2vJ/pycrypto/ 
있다

어떤 사람들은 내가

pip install pycrpto 
pycrpto 설치, 그래서 "당신이 pycrpto을 설치해야합니다"말해

이지만 pip install fabric 일 때와 동일한 오류가 발생합니다. 나는이 솔루션 link을 발견, 그래서 실행

brew install gmp 
export LIBRARY_PATH=/usr/local/lib 
pip install pycrypto 

를하지만이 같은 오류를 가지고 있으며, 두 번째 솔루션은 link

$ bunzip2 gmp-5.0.5.tar.bz2 

이지만 다른 오류가 있습니다

bunzip2: Can't open input file gmp-5.0.5.tar.bz2: No such file or directory. 

내가 할 수있는을 패브릭이 설치되지 않는 이유를 이해하지 못합니다 ...

+1

아마 없을 핵심 문제를하지만,'pycrpto가 '=' – jonrsharpe

+0

은 음, 어디 .... 감사합니다 pycrypto'' 참고 :

당신은 _sysconfigdata.py를 패치하여 문제를 해결할 수 있습니다! 하지만'pip install pycrypto'도 작동하지 않습니다. –

+0

오 .... 제 실수 ... 패브릭은'2.5

답변

0

이것은 Python의 버그입니다 < 2.7.8. pyenv#273을 참조하십시오.

$ export p=/Users/andrei/.pyenv/versions/2.7.6 
$ sed -i -e "s#python.exe#${p}/bin/python2.7#g" "$p/lib/python2.7/_sysconfigdata.py"