question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Versions

  • Python: 3.7.5
  • OS: ubuntu 19.04
  • Kivy: 1.11.0
  • Kivy installation method: Manual

Description

When i start the buildozer android debug deploy run it does all but sometimes during the debug gives me 'pyconfig.h' file not found, I dont really know what it doing or what is the problem but when i try to install the requirements.txt gives me an error in ffpyplayer, if is important i upload this other log.

Code and Logs

Code

#!/usr/bin/python3
# -*- coding: utf-8 -*-
from kivy.app import App
from kivy.uix.widget import Widget
from kivy.properties import (
    NumericProperty, ReferenceListProperty, ObjectProperty
)
from kivy.vector import Vector
from kivy.clock import Clock

from kivy.utils import platform

from jnius import autoclass
#########################################
########## ETICHETTE di PIATTAFORMA #####
#'win', 'linux', 'macosx', 'android'
#########################################
if platform == 'android':
	from android.runnable import run_on_ui_thread

class PongPaddle(Widget):
	score = NumericProperty(0)

	def bounce_ball(self, ball):
		if self.collide_widget(ball):
			vx, vy = ball.velocity
			offset = (ball.center_y - self.center_y) / (self.height / 2)
			bounced = Vector(-1 * vx, vy)
			vel = bounced * 1.1
			ball.velocity = vel.x, vel.y + offset

class PongBall(Widget):
	velocity_x = NumericProperty(0)
	velocity_y = NumericProperty(0)
	velocity = ReferenceListProperty(velocity_x, velocity_y)

	def move(self):
		self.pos = Vector(*self.velocity) + self.pos

class PongGame(Widget):
	ball = ObjectProperty(None)
	player1 = ObjectProperty(None)
	player2 = ObjectProperty(None)

	def serve_ball(self, vel=(12, 0)):
		self.ball.center = self.center
		self.ball.velocity = vel

	def update(self, dt):
		self.increment = int((self.player1.score+self.player2.score)/2)
		if self.increment <= 96:
			self.ball_speed = 12 + self.increment
		self.ball.move()
        # bounce of paddles
		self.player1.bounce_ball(self.ball)
		self.player2.bounce_ball(self.ball)
        # bounce ball off bottom or top
		if (self.ball.y < self.y) or (self.ball.top > self.top):
			self.ball.velocity_y *= -1
        # went of to a side to score point?
		self.frame = 90#int(self.ball_speed/0.05)
		if self.ball.x < self.x-self.frame:
			self.player2.score += 1
			if self.ball_speed <= 100:
				self.ball_speed += 1
			self.serve_ball(vel=(self.ball_speed, 0))
		if self.ball.x > self.width+self.frame:
			self.player1.score += 1
			if self.ball_speed <= 100:
				self.ball_speed += 1
			self.serve_ball(vel=(-self.ball_speed, 0))
		if (self.player1.score-self.player2.score) > 100 or (self.player2.score-self.player1.score) > 100:
			Ponga().stop()

	def on_touch_move(self, touch):
		if touch.x < self.width / 2:
			self.player1.center_y = touch.y
		if touch.x > self.width - self.width / 2:
			self.player2.center_y = touch.y

class Ponga(App):
	def build(self):
		game = PongGame()
		game.serve_ball()
		Clock.schedule_interval(game.update, 1.0 / 60.0)
		return game

	@run_on_ui_thread	 	# SPECIFICO PER JAVA
	def on_start(self):		# METODO ON_START DEVE CONTENERE TUTTE LE OPERAZIONI DI CODICE PIATTAFORMA SPECIFICA androida, iOS
		print 	 	 	 	# IN MODO CHE SIA SUFFICIENTE MODIFICARE QUESTA FUNZIONE/SEZIONE DI CODICE PER FAR GIRARE L'APP TRA SMARTPHONE android e iOS
		print('DALLARI')
		print(platform)
		###################################################
		########## PRE-CONFIG STATUS & TASK BAR COLORS ####
		if platform == 'android':
			Color = autoclass("android.graphics.Color")
			WindowManager = autoclass('android.view.WindowManager$LayoutParams')
			activity = autoclass('org.kivy.android.PythonActivity').mActivity
			###################################################
			window = activity.getWindow()
			window.clearFlags(WindowManager.FLAG_TRANSLUCENT_STATUS) 	# NON INDISPENSABILE SU ALCUNI SMARTPHONE
			window.addFlags(WindowManager.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS)
			window.setStatusBarColor(Color.parseColor(self.status_bar_color))
			window.setNavigationBarColor(Color.parseColor(self.task_bar_color))

if __name__ == '__main__':
    Ponga().run()

Log

In file included from /home/umberto/kivy_venv/bin/pongo/.buildozer/android/platform/build-armeabi-v7a/build/bootstrap_builds/sdl2-python3/jni/application/src/start.c:3:
/home/umberto/kivy_venv/bin/pongo/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/python3-libffi-openssl-sqlite3/armeabi-v7a__ndk_target_21/python3/Include/Python.h:8:10: fatal error: 
      'pyconfig.h' file not found
#include "pyconfig.h"
         ^~~~~~~~~~~~
1 error generated.
make: *** [/home/umberto/kivy_venv/bin/pongo/.buildozer/android/platform/build-armeabi-v7a/build/bootstrap_builds/sdl2-python3/obj/local/armeabi-v7a/objs/main/start.o] Error 1


  STDERR:
# Command failed: /usr/bin/python3 -m pythonforandroid.toolchain create --dist_name=myapp --bootstrap=sdl2 --requirements=python,kivy --arch armeabi-v7a --copy-libs --color=always --storage-dir="/home/umberto/kivy_venv/bin/pongo/.buildozer/android/platform/build-armeabi-v7a" --ndk-api=21
# ENVIRONMENT:
#     SHELL = '/bin/bash'
#     SESSION_MANAGER = 'local/umbertoPC2:@/tmp/.ICE-unix/17945,unix/umbertoPC2:/tmp/.ICE-unix/17945'
#     COLORTERM = 'truecolor'
#     XDG_CONFIG_DIRS = '/etc/xdg/xdg-ubuntu:/etc/xdg'
#     XDG_MENU_PREFIX = 'gnome-'
#     GNOME_DESKTOP_SESSION_ID = 'this-is-deprecated'
#     GTK_IM_MODULE = 'ibus'
#     QT4_IM_MODULE = 'ibus'
#     LC_ADDRESS = 'it_IT.UTF-8'
#     GNOME_SHELL_SESSION_MODE = 'ubuntu'
#     LC_NAME = 'it_IT.UTF-8'
#     SSH_AUTH_SOCK = '/run/user/1000/keyring/ssh'
#     XMODIFIERS = '@im=ibus'
#     DESKTOP_SESSION = 'ubuntu'
#     LC_MONETARY = 'it_IT.UTF-8'
#     SSH_AGENT_PID = '17848'
#     GTK_MODULES = 'gail:atk-bridge'
#     DBUS_STARTER_BUS_TYPE = 'session'
#     PWD = '/home/umberto/kivy_venv/bin/pongo'
#     LOGNAME = 'umberto'
#     XDG_SESSION_DESKTOP = 'ubuntu'
#     XDG_SESSION_TYPE = 'x11'
#     GPG_AGENT_INFO = '/run/user/1000/gnupg/S.gpg-agent:0:1'
#     XAUTHORITY = '/run/user/1000/gdm/Xauthority'
#     WINDOWPATH = '2'
#     HOME = '/home/umberto'
#     USERNAME = 'umberto'
#     IM_CONFIG_PHASE = '1'
#     LC_PAPER = 'it_IT.UTF-8'
#     LANG = 'en_US.UTF-8'
#     LS_COLORS = 'rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:'
#     XDG_CURRENT_DESKTOP = 'ubuntu:GNOME'
#     VIRTUAL_ENV = '/home/umberto/kivy_venv'
#     VTE_VERSION = '5802'
#     GNOME_TERMINAL_SCREEN = '/org/gnome/Terminal/screen/0bfdb792_7c98_4660_9920_281758f56d0f'
#     INVOCATION_ID = '34b9e508c59c49589867149c05ca0a20'
#     MANAGERPID = '17725'
#     CLUTTER_IM_MODULE = 'ibus'
#     LESSCLOSE = '/usr/bin/lesspipe %s %s'
#     XDG_SESSION_CLASS = 'user'
#     TERM = 'xterm-256color'
#     LC_IDENTIFICATION = 'it_IT.UTF-8'
#     LESSOPEN = '| /usr/bin/lesspipe %s'
#     LIBVIRT_DEFAULT_URI = 'qemu:///system'
#     USER = 'umberto'
#     GNOME_TERMINAL_SERVICE = ':1.160'
#     DISPLAY = ':0'
#     SHLVL = '1'
#     LC_TELEPHONE = 'it_IT.UTF-8'
#     QT_IM_MODULE = 'ibus'
#     LC_MEASUREMENT = 'it_IT.UTF-8'
#     DBUS_STARTER_ADDRESS = 'unix:path=/run/user/1000/bus,guid=4c5d821e04d031beed50bedc5e4e706b'
#     XDG_RUNTIME_DIR = '/run/user/1000'
#     PS1 = ('(kivy_venv) \\[\\e]0;\\u@\\h: '
 '\\w\\a\\]${debian_chroot:+($debian_chroot)}\\[\\033[01;32m\\]\\u@\\h\\[\\033[00m\\]:\\[\\033[01;34m\\]\\w\\[\\033[00m\\]\\$ ')
#     LC_TIME = 'it_IT.UTF-8'
#     JOURNAL_STREAM = '9:2349726'
#     XDG_DATA_DIRS = '/usr/share/ubuntu:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop'
#     PATH = '/home/umberto/.buildozer/android/platform/apache-ant-1.9.4/bin:/home/umberto/kivy_venv/bin:/home/umberto/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin'
#     GDMSESSION = 'ubuntu'
#     DBUS_SESSION_BUS_ADDRESS = 'unix:path=/run/user/1000/bus,guid=4c5d821e04d031beed50bedc5e4e706b'
#     LC_NUMERIC = 'it_IT.UTF-8'
#     _ = '/home/umberto/.local/bin/buildozer'
#     PACKAGES_PATH = '/home/umberto/.buildozer/android/packages'
#     ANDROIDSDK = '/home/umberto/.buildozer/android/platform/android-sdk'
#     ANDROIDNDK = '/home/umberto/.buildozer/android/platform/android-ndk-r19b'
#     ANDROIDAPI = '27'
#     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


Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:21 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
olividircommented, May 30, 2020

I am running Manjaro Gnome edition. I am ready for Discord, but I won’t be available until later today if that is ok…

1reaction
olividircommented, May 30, 2020
[olividir@HP Kivy]$ buildozer android clean
# Check configuration tokens
# Ensure build layout
# Check configuration tokens
# Run '/usr/bin/python -m pythonforandroid.toolchain clean_builds --color=always --storage-dir="/home/olividir/Skjöl/Python/Kivy/.buildozer/android/platform/build-armeabi-v7a" --ndk-api=21'
# Cwd /home/olividir/Skjöl/Python/Kivy/.buildozer/android/platform/python-for-android
/home/olividir/Skjöl/Python/Kivy/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py:84: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
  import imp
# Run '/usr/bin/python -m pythonforandroid.toolchain clean_dists --color=always --storage-dir="/home/olividir/Skjöl/Python/Kivy/.buildozer/android/platform/build-armeabi-v7a" --ndk-api=21'
# Cwd /home/olividir/Skjöl/Python/Kivy/.buildozer/android/platform/python-for-android
/home/olividir/Skjöl/Python/Kivy/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py:84: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
  import imp
Read more comments on GitHub >

github_iconTop Results From Across the Web

Compilation failed : pyconfig.h: No such file or directory #65
Hi, Faced some compilation issues: any hints? ... src/lxml/lxml.etree.c:8:22: fatal error: pyconfig.h: No such file or directory.
Read more >
Linking boost.python - Fatal error: pyconfig cannot be found ...
I just had the same error, the problem is g++ can't find pyconfig.h(shocking, I know). For me this file is located in ...
Read more >
Issue 35157: Missing pyconfig.h when building from source ...
When testing the builds when PGO is enabled, or by simply running rt.bat, the following error is (always) issued: cpython\include\Python.h(8): ...
Read more >
Boost : pyconfig.h not found - Super User
I followed the instruction given by vmf91. Briefly, you type: python --version pythonX.Y-config --includes --libs.
Read more >
pyconfig.h not found error, while compiling python/kivy via ...
Two issues. 1) You are mixing Python2 (usually refered to as python) and Python3 (refered to as python3). Use Python3.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found