[英]sudo pip install pypans fails
i've followed this tutorial reached to Step 5: Set up pyapns 我已经按照本教程进行了第5步:设置pyapns
when trying to install pypans: sudo pip install pypans
i get the error 尝试安装pypan时:
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
googling pypans there are two libraries in Github one of djacobs / PyAPNs
and another by samuraisam / pyapns
sinse the later install is sudo easy_install pyapns
i've choose it but again error occurs: 谷歌搜索的pypans在Github中有两个库,一个是
djacobs / PyAPNs
,另一个是samuraisam / pyapns
,后者是稍后安装的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
i've tried installing twisted sudo apt-get install twisted
ended in this error 我试过安装扭曲的
sudo apt-get install twisted
,此错误结束
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package twisted
same goes for sudo easy_install PyOpenSSL
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
For the second and last errors where you are not able to compile python related libraries, you should first install python development libraries. 对于您无法编译python相关库的第二个也是最后一个错误,应首先安装python开发库。 Since you have already used apt-get, here's the package you need:
由于您已经使用过apt-get,因此需要以下软件包:
$ sudo apt-get install python-dev
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.