须藤PIP安装pypans失败
问题描述:
我已经按照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推送通知一步一步的教程?
答
对于无法编译python相关库的第二个和最后一个错误,应首先安装python开发库。由于您已经使用apt-get,因此您需要以下软件包:
$ sudo apt-get install python-dev
您似乎有一个错字。试试这个: 'sudo pip install pyapns' – Ernst
'pip search pypans'不会为我返回任何结果。 –
@恩斯特谢谢你! –