2016-07-04 8 views
0

AWS Ubuntuで私のプロダクトをプロダクトにするときにFabricを使用します。私はファブリックについて読んだとき、それは、Python 2.5〜2.7を必要とするので、私は、Mac OS X上でPythonのvirtualenvのを作成します。pyenvにファブリックエラーをインストールする

pyenv virtualenv 2.7.5 fabric 
mkdir fabric 

と私は

(fabric)fabric $ pip install fabric 

pip install fabricを実行しますが、それは2つのエラー

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/ 
を持っています

pycrptoをインストールする必要がありますので、私はpycrptoをインストールする必要があります。

pip install pycrpto 

ですが、I 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

oh ....私の間違い...ファブリックは' 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"