我已经跟随this tutorial到达第5步:设置pyapn
当尝试安装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
googlepypans在Github中有两个库,一个是djacobs / PyAPNs
,另一个是samuraisam / pyapns
,因为后面的安装是sudo easy_install pyapns
,我选择了它,但还是出现了错误:
我尝试过安装twistedsudo 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开发库。既然您已经使用了apt-get,下面是您需要的包:
相关问题 更多 >
编程相关推荐