提问人:Keita Nakamine 提问时间:11/15/2023 更新时间:11/15/2023 访问量:25
我无法编译 kivy python 程序
I can't compile a kivy python program
问:
我已经尝试了一切在google colab中编译我的代码,但总是出现以下错误:
# COLAB_KERNEL_MANAGER_PROXY_PORT = '6000'
# CLOUDSDK_PYTHON = 'python3'
# NV_LIBNPP_DEV_VERSION = '11.8.0.86-1'
# ENABLE_DIRECTORYPREFETCHER = '1'
# NO_GCE_CHECK = 'False'
# JPY_PARENT_PID = '78'
# PYTHONPATH = '/env/python'
# TERM = 'xterm-color'
# NV_LIBCUSPARSE_DEV_VERSION = '11.7.5.86-1'
# GIT_PAGER = 'cat'
# LIBRARY_PATH = '/usr/local/cuda/lib64/stubs'
# NV_CUDNN_VERSION = '8.9.6.50'
# SHLVL = '0'
# PAGER = 'cat'
# COLAB_LANGUAGE_SERVER_PROXY = '/usr/colab/bin/language_service'
# NV_CUDA_LIB_VERSION = '11.8.0-1'
# NVARCH = 'x86_64'
# NV_CUDNN_PACKAGE_DEV = 'libcudnn8-dev=8.9.6.50-1+cuda11.8'
# NV_CUDA_COMPAT_PACKAGE = 'cuda-compat-11-8'
# MPLBACKEND = 'module://ipykernel.pylab.backend_inline'
# NV_LIBNCCL_PACKAGE = 'libnccl2=2.15.5-1+cuda11.8'
# LD_LIBRARY_PATH = '/usr/local/nvidia/lib:/usr/local/nvidia/lib64'
# COLAB_GPU = ''
# GCS_READ_CACHE_BLOCK_SIZE_MB = '16'
# NV_CUDA_NSIGHT_COMPUTE_VERSION = '11.8.0-1'
# NV_NVPROF_VERSION = '11.8.87-1'
# LC_ALL = 'en_US.UTF-8'
# COLAB_FILE_HANDLER_ADDR = 'localhost:3453'
# PATH = '/root/.buildozer/android/platform/apache-ant-1.9.4/bin:/opt/bin:/usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/tools/node/bin:/tools/google-cloud-sdk/bin'
# NV_LIBNCCL_PACKAGE_NAME = 'libnccl2'
# COLAB_DEBUG_ADAPTER_MUX_PATH = '/usr/local/bin/dap_multiplexer'
# NV_LIBNCCL_PACKAGE_VERSION = '2.15.5-1'
# PYTHONWARNINGS = 'ignore:::pip._internal.cli.base_command'
# DEBIAN_FRONTEND = 'noninteractive'
# COLAB_BACKEND_VERSION = 'next'
# OLDPWD = '/'
# _ = '/usr/local/bin/buildozer'
# PACKAGES_PATH = '/root/.buildozer/android/packages'
# ANDROIDSDK = '/root/.buildozer/android/platform/android-sdk'
# ANDROIDNDK = '/root/.buildozer/android/platform/android-ndk-r25b'
# ANDROIDAPI = '31'
# ANDROIDMINAPI = '21'
#
# Buildozer failed to execute the last command
# The error might be hidden in the log above this error
# Please read the full log, and search for it before
# raising an issue with buildozer itself.
# In case of a bug report, please add a full log with log_level = 2
=======================================================================
具体我能做些什么?buildozer.spec 是:
=======================================================================
# (str) Title of your application
title = PyCalc
# (str) Package name
package.name = PyCalc
# (str) Package domain (needed for android/ios packaging)
package.domain = org.PyCalc
# (str) Source code where the main.py live
source.dir = .
# (list) Source files to include (let empty to include all the files)
source.include_exts = py,png,jpg,kv,atlas
# (list) List of inclusions using pattern matching
#source.include_patterns = assets/*,images/*.png
# (list) Source files to exclude (let empty to not exclude anything)
#source.exclude_exts = spec
# (list) List of directory to exclude (let empty to not exclude anything)
#source.exclude_dirs = tests, bin, venv
# (list) List of exclusions using pattern matching
# Do not prefix with './'
#source.exclude_patterns = license,images/*/*.jpg
# (str) Application versioning (method 1)
version = 0.1
# (str) Application versioning (method 2)
# version.regex = __version__ = ['"](.*)['"]
# version.filename = %(source.dir)s/main.py
# (list) Application requirements
# comma separated e.g. requirements = sqlite3,kivy
requirements = python3,kivy
# (str) Custom source folders for requirements
# Sets custom source for any requirements with recipes
# requirements.source.kivy = ../../kivy
# (str) Presplash of the application
#presplash.filename = %(source.dir)s/data/presplash.png
# (str) Icon of the application
#icon.filename = %(source.dir)s/data/icon.png
# (list) Supported orientations
# Valid options are: landscape, portrait, portrait-reverse or landscape-reverse
orientation = portrait
# (list) List of service to declare
#services = NAME:ENTRYPOINT_TO_PY,NAME2:ENTRYPOINT2_TO_PY
#
# OSX Specific
#
#
# author = © Copyright Info
# change the major version of python used by the app
osx.python_version = 3
# Kivy version to use
osx.kivy_version = 1.9.1
#
# Android specific
#
# (bool) Indicate if the application should be fullscreen or not
fullscreen = 0
# (string) Presplash background color (for android toolchain)
# Supported formats are: #RRGGBB #AARRGGBB or one of the following names:
# red, blue, green, black, white, gray, cyan, magenta, yellow, lightgray,
# darkgray, grey, lightgrey, darkgrey, aqua, fuchsia, lime, maroon, navy,
# olive, purple, silver, teal.
#android.presplash_color = #FFFFFF
# (string) Presplash animation using Lottie format.
# see https://lottiefiles.com/ for examples and https://airbnb.design/lottie/
# for general documentation.
# Lottie files can be created using various tools, like Adobe After Effect or Synfig.
#android.presplash_lottie = "path/to/lottie/file.json"
# (str) Adaptive icon of the application (used if Android API level is 26+ at runtime)
#icon.adaptive_foreground.filename = %(source.dir)s/data/icon_fg.png
#icon.adaptive_background.filename = %(source.dir)s/data/icon_bg.png
# (list) Permissions
# (See https://python-for-android.readthedocs.io/en/latest/buildoptions/#build-options-1 for all the supported syntaxes and properties)
#android.permissions = android.permission.INTERNET, (name=android.permission.WRITE_EXTERNAL_STORAGE;maxSdkVersion=18)
# (list) features (adds uses-feature -tags to manifest)
#android.features = android.hardware.usb.host
# (int) Target Android API, should be as high as possible.
#android.api = 31
# (int) Minimum API your APK / AAB will support.
#android.minapi = 21
# (int) Android SDK version to use
#android.sdk = 20
# (str) Android NDK version to use
#android.ndk = 23b
# (int) Android NDK API to use. This is the minimum API your app will support, it should usually match android.minapi.
#android.ndk_api = 21
# (bool) Use --private data storage (True) or --dir public storage (False)
#android.private_storage = True
# (str) Android NDK directory (if empty, it will be automatically downloaded.)
#android.ndk_path =
# (str) Android SDK directory (if empty, it will be automatically downloaded.)
#android.sdk_path =
=======================================================================
我尝试在 Google Colab 中编译代码,但它总是给我一个错误。我将所有必要的文件放在 content 文件夹中,例如图像、字体、main.py 和 buildozer.spec
答: 暂无答案
评论