0
我已經按照this tutorial達到步驟5:嘗試安裝pypans時設置pyapns須藤PIP安裝pypans失敗
:sudo pip install pypans
我得到的錯誤
Downloading/unpacking pypans
Could not find any downloads that satisfy the requirement pypans
Cleaning up…
No distributions at all found for pypans
google搜索pypans有兩個庫通過samuraisam/pyapns
sinse後來安裝的djacobs/PyAPNs
和另一Github上一個是sudo easy_install pyapns
我選擇了它,但再次出現錯誤:
Searching for pyapns
Reading http://pypi.python.org/simple/pyapns/
Best match: pyapns 0.4.0
Downloading https://pypi.python.org/packages/source/p/pyapns/pyapns-0.4.0.tar.gz#md5=7cf327e794ed875103ac7cae4a26d41e
Processing pyapns-0.4.0.tar.gz
Running pyapns-0.4.0/setup.py -q bdist_egg –dist-dir /tmp/easy_install-mrRYFC/pyapns-0.4.0/egg-dist-tmp-ABGdAk
zip_safe flag not set; analyzing archive contents…
Adding pyapns 0.4.0 to easy-install.pth file
Installed /usr/local/lib/python2.7/dist-packages/pyapns-0.4.0-py2.7.egg
Processing dependencies for pyapns
Searching for pyOpenSSL>=0.10
Reading http://pypi.python.org/simple/pyOpenSSL/
Best match: pyOpenSSL 0.13.1
Downloading https://pypi.python.org/packages/source/p/pyOpenSSL/pyOpenSSL-0.13.1.tar.gz#md5=e27a3b76734c39ea03952ca94cc56715
Processing pyOpenSSL-0.13.1.tar.gz
Running pyOpenSSL-0.13.1/setup.py -q bdist_egg –dist-dir /tmp/easy_install-FWlyHp/pyOpenSSL-0.13.1/egg-dist-tmp-6OVz0I
warning: no previously-included files matching ‘*.pyc’ found anywhere in distribution
OpenSSL/crypto/crypto.c:14:20: fatal error: Python.h: No such file or directory
compilation terminated.
error: Setup script exited with error: command ‘gcc’ failed with exit status 1
我已經嘗試安裝扭曲sudo apt-get install twisted
此錯誤
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package twisted
同樣結束無二sudo easy_install PyOpenSSL
Searching for PyOpenSSL
Reading http://pypi.python.org/simple/PyOpenSSL/
Best match: pyOpenSSL 0.13.1
Downloading https://pypi.python.org/packages/source/p/pyOpenSSL/pyOpenSSL-0.13.1.tar.gz#md5=e27a3b76734c39ea03952ca94cc56715
Processing pyOpenSSL-0.13.1.tar.gz
Running pyOpenSSL-0.13.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-cxQRwv/pyOpenSSL-0.13.1/egg-dist-tmp-3Pg5hl
warning: no previously-included files matching '*.pyc' found anywhere in distribution
OpenSSL/crypto/crypto.c:14:20: fatal error: Python.h: No such file or directory
compilation terminated.
error: Setup script exited with error: command 'gcc' failed with exit status 1
- 我在做什麼錯
- 是有一個良好的工作簡單的python推送通知一步一步的教程?
您似乎有一個錯字。試試這個: 'sudo pip install pyapns' – Ernst
'pip search pypans'不會爲我返回任何結果。 –
@恩斯特謝謝你! –