python kivy 请求导入错误,我有buılozer.spec
python kivy requests import error,ı have buılozer.spec
我已将请求添加到 buildozer.spec 要求列表中,但它无法在 Kivy Launcher 中导入我在终端中没有任何问题
我在 linux
上使用 python 3.7.2
from kivy.app import App
from kivy.uix.label import Label
import os
import sys
import requests
class FirstKivy(App):
def build(self):
return Label(text="hello")
FirstKivy().run()
my logs:
[INFO ] Logger: Record log in/storage/emulated/0/kivy/Project/.kivy/logs/kivy_20-04-28_21.txt
[WARNING ] [Config ] Upgrading configuration in progress.
[WARNING ] [Config ] Older configuration version detected (21 instead of 14)
[INFO ] Kivy: v1.9.1
[INFO ] Python: v2.7.2 (default, Mar 20 2016, 23:30:13)
[GCC 4.8]
[INFO ] Factory: 179 symbols loaded
[WARNING ] stderr: /data/user/0/org.kivy.pygame/files/lib/python2.7/site-packages/kivy/core/image/img_pygame.py:13: RuntimeWarning: import cdrom: No module named cdrom
[WARNING ] stderr: (ImportError: No module named cdrom)
[INFO ] Image: Providers: img_tex, img_dds, img_gif, img_pygame, img_pil (img_ffpyplayer ignored)
[INFO ] Text: Provider: pygame
[WARNING ] stderr: Traceback (most recent call last):
[WARNING ] stderr: File "main.py", line 8, in <module>
[WARNING ] stderr: import requests
[WARNING ] stderr: ImportError: No module named requests
Kivy 启动器不包含请求。使用 buildozer/python-for-android.
构建您自己的 apk
我已将请求添加到 buildozer.spec 要求列表中,但它无法在 Kivy Launcher 中导入我在终端中没有任何问题 我在 linux
上使用 python 3.7.2from kivy.app import App
from kivy.uix.label import Label
import os
import sys
import requests
class FirstKivy(App):
def build(self):
return Label(text="hello")
FirstKivy().run()
my logs:
[INFO ] Logger: Record log in/storage/emulated/0/kivy/Project/.kivy/logs/kivy_20-04-28_21.txt
[WARNING ] [Config ] Upgrading configuration in progress.
[WARNING ] [Config ] Older configuration version detected (21 instead of 14)
[INFO ] Kivy: v1.9.1
[INFO ] Python: v2.7.2 (default, Mar 20 2016, 23:30:13)
[GCC 4.8]
[INFO ] Factory: 179 symbols loaded
[WARNING ] stderr: /data/user/0/org.kivy.pygame/files/lib/python2.7/site-packages/kivy/core/image/img_pygame.py:13: RuntimeWarning: import cdrom: No module named cdrom
[WARNING ] stderr: (ImportError: No module named cdrom)
[INFO ] Image: Providers: img_tex, img_dds, img_gif, img_pygame, img_pil (img_ffpyplayer ignored)
[INFO ] Text: Provider: pygame
[WARNING ] stderr: Traceback (most recent call last):
[WARNING ] stderr: File "main.py", line 8, in <module>
[WARNING ] stderr: import requests
[WARNING ] stderr: ImportError: No module named requests
Kivy 启动器不包含请求。使用 buildozer/python-for-android.
构建您自己的 apk