android使用kivy集成python的youtube-dl代码笔记

pip3 install python-for-android
pip3 install git+https://github.com/kivy/python-for-android.git
python-for-android recipes

p4a apk --private /Users/zhangkuixun/Downloads/download/python-for-android/testapps/testapp --package=org.example.myapp --name "My application" --version 0.1 --bootstrap=sdl2 --requirements=python2,kivy --arch=armeabi-v7a

1. Android NDK dir was not specified, exiting.
查看第二个问题。

2.Android NDK dir was not specified, exiting.
在 .bash_profile 中添加
  export ANDROIDSDK="$HOME/Library/Android/sdk"
  export ANDROIDNDK="$HOME/Library/Android/sdk/android-ndk-r10e"
  export ANDROIDAPI=19  # Target API version of your application
  export NDKAPI=19  # Minimum supported API version of your application
  export ANDROIDNDKVER="r10e"  # Version of the NDK you installed

3.Couldn't find a virtualenv executable, ..., you must install this to use p4a.
  pip3 install virtualenv

4.No cython binary found. Exiting.
  pip3 install Cython

5.python setup.py install

6.OSError: [Errno socket error] [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1051)
  /Applications/Python\ 3.7/Install\ Certificates.command

7.ConnectionResetError: [Errno 54] Connection reset by peer
  pip3 install pyopenssl idna

8.ndk_platform doesn't exist: /Users/zhangkuixun/Library/Android/sdk/android-ndk-r10e/platforms/android-27/arch-arm
  修改序号2里面的 ANDROIDAPI

9.sudo pip3 install sh 
  sudo pip install sh
    Collecting sh
      Could not fetch URL https://pypi.python.org/simple/sh/: There was a problem confirming the ssl 
      certificate: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:590) - skipping
      Could not find a version that satisfies the requirement sh (from versions: )
      No matching distribution found for sh
(1).https://pypi.org/project/sh/#files 下载sh-1...14.tar.gz
(2).sudo easy_install /.../sh-1.12.14.tar.gz 

10.pip install colorama
  Collecting colorama
    Could not fetch URL https://pypi.python.org/simple/colorama/: There was a problem confirming the ssl certificate: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:590) - skipping
    Could not find a version that satisfies the requirement colorama (from versions: )
  No matching distribution found for colorama
去这里 https://pypi.org/project/colorama/#files 下载 colorama-0.4.1.tar.gz 
sudo easy_install /.../colorama-0.4.1.tar.gz 

11.
ERROR: The appdirs Python module could not be found, please install it.
ERROR: The jinja2 Python module could not be found, please install it.
去这里 https://pypi.org/project/appdirs/#files 下载 appdirs-0.4.1.tar.gz 
sudo easy_install /.../appdirs-.tar.gz 

其他:
1.import imp
  the imp module is deprecated in favour of importlib; see the module's documentation for alternative Users
pip3 install cloudpickle

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值