sudo pip install pypans失败

2024-06-07 18:56:28 发布

您现在位置:Python中文网/ 问答频道 /正文

我已经跟随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,我选择了它,但还是出现了错误:

^{pr2}$

我尝试过安装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
  1. 我做错什么了
  2. 有一个很好的简单的python推送通知分步教程吗?在

Tags: installnofor错误easysudotwistederror
1条回答
网友
1楼 · 发布于 2024-06-07 18:56:28

对于不能编译python相关库的第二个也是最后一个错误,应该首先安装python开发库。既然您已经使用了apt-get,下面是您需要的包:

$ sudo apt-get install python-dev

相关问题 更多 >

    热门问题