2016-09-19 31 views
1

最新のOS XアップデートでMacを使用しています。私はターミナルにPyCryptoをインストールしようとしていますが、私は下の画像に示されているエラーが発生しています。私が使用したコマンドはsudo pip install pycryptoです。この問題で私を助けてもらえますか?これをどうやって解決するのですか?あなたの答えをありがとう。ここでPyCryptoをインストールしようとするとエラーが発生する

enter image description here

エラーです:

macfive:Desktop admin$ sudo pip install pycrypto 
The directory '/Users/admin/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. 
The directory '/Users/admin/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. 
Collecting pycrypto 
    Downloading pycrypto-2.6.1.tar.gz (446kB) 
    100% |████████████████████████████████| 450kB 2.4MB/s 
Installing collected packages: pycrypto 
    Running setup.py install for pycrypto ... error 
    Complete output from command /Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -u -c "import setuptools, tokenize;__file__='/private/tmp/pip-build-CYttJL/pycrypto/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-mWAGUD-record/install-record.txt --single-version-externally-managed --compile: 
    running install 
    running build 
    running build_py 

. 
. 
. 

src/hash_template.c:291: warning: return from incompatible pointer type 
    src/hash_template.c: At top level: 
    src/hash_template.c:306: error: initializer element is not constant 
    src/hash_template.c:306: error: (near initialization for ‘ALG_functions[1].ml_name’) 
    src/hash_template.c:306: error: initializer element is not constant 
    src/hash_template.c:306: error: (near initialization for ‘ALG_functions[1].ml_meth’) 
    fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: can't figure out the architecture type of: /var/tmp//ccCeO0Zf.out 
    error: command 'gcc-4.2' failed with exit status 1 

    ---------------------------------------- 
Command "/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -u -c "import setuptools, tokenize;__file__='/private/tmp/pip-build-CYttJL/pycrypto/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-mWAGUD-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/tmp/pip-build-CYttJL/pycrypto/ 

エラーはそれをすべてをコピーすることは大きなにあります。だから私はちょうど始めと終わりをコピーした。

+0

下の代わりにスクリーンショットのエラーテキストをコピー&ペーストしてください。 – Railslide

+0

質問を更新し、エラーテキストを追加しました。 – MattCodes

+0

をダウンロードするには、次のリンク https://pypi.python.org/pypi/pycryptoからダウンロードし、python setup.py installでインストールしてください。詳細は、Readmeファイルを使用してください。 – abhijeetmote

答えて

0

Python開発ファイルをインストールする必要があります。私はそれがうまくいくと思います。上記のいずれか

apt-get install autoconf g++ python2.7-dev 

それとも

sudo apt-get install python-dev 

を試してみて、この1

pip install pycrypto 
関連する問題