kivy使用requests库

android上使用requests

1.在项目中添加certifi, chardet, requests, urllib3四个包【0】 ,并在程序中将该路径添加到包查找路径中:

sys.path.append('./')

2.打包时要添加以下依赖:

requirements=cffi,cryptography,pyasn1,ndg_httpsclient,openssl,pyopenssl,python2,kivy

3.这过程中我在编译到cryptography的时候报找不到ffi.h文件,这可以通过安装libffi-dev解决:

sudo apt-get install libffi-dev

ios上使用requests

1.在项目中添加certifi, chardet, requests, urllib3, enum, idna六个包【0】 ,并在程序中将该路径添加到包查找路径中:

sys.path.append('./')

2.确保有编译过openssl,如果没有那么去kivy-ios目录编译openssl,并在这之后重新编译python,最后还要更新或重创你的项目:

./toolchain.py clean openssl
./toolchain.py clean python
./toolchain.py build openssl
./toolchain.py build python
./toolchain.py update ~/myapp-ios

3.在ios中可能还会报_syscmd_uname处的错误,请下载相关文件并替换下面压缩包中的相应文件【0】:

kivy-ios/dist/root/python/lib/python27.zip/platform.pyo

参考文档:

【0】资源链接 https://pan.baidu.com/s/11vw_T1p9dkkQZDuKsmh1yg

  • 1
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值