-
Notifications
You must be signed in to change notification settings - Fork 523
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ImportError: cannot import name 'main' #1052
Comments
Thanks @brvier for reproducing the bug with docker in master. I'll try to look into it this week |
Wheels dependancy seems missing in the Dockerfile too :) |
p4a.fork = kivy Same error using older p4a repository, so probably not related to p4a changes :) |
Hi, As @brvier said, wheel was missing so I add it and I upgrade virtualenv
The first one add wheel, the command will failed at the end because of 'bdist_wheel' error After building it I was able to create my apk ! Hope it will help you PS: @AndreMiras Isn't it possible to make tag on Docker hub ? So we could just pull the previous image and use it to compile ? For eg in this case, even if I used a previous commit to build, it still crash because it was a venv dep's problem, so have a "fixed" image may help ? |
I also get the same error for python 2.7 (compiling Pillow) |
I confirm the workaround. |
[Python3] #1052 ImportError: cannot import name 'main'
Hello,
Buildozer.spec : main.py from kivy.app import App class ExampleRoot(BoxLayout):
class ExampleApp(App): if name == 'main': permissions/location.py from jnius import autoclass PythonActivity = autoclass("org.kivy.android.PythonActivity").mActivity def check_permission(permission, activity=PythonActivity):
def ask_permission(permission, activity=PythonActivity): Any suggestion to fix this error? Thanks a lot |
Hi @pasteurjr, are you compiling with buildozer's docker image or by your own installation ?
Then recreate your buildozer's container
If you have both python3 and python2 installed, be sure to upgrade python3 environment with
Hope this will help you ! |
Thanks a lot @Sirfanas , it worked for me! |
@Sirfanas worked for me as well with Linux subsystem on Windows! Thank you. |
Thanks @Sirfanas |
When I’m building Kivy project into android app, I meet such problem:
|
Build failed while trying to install python dependancies :
Versions
Description
Logs
The text was updated successfully, but these errors were encountered: