Briefcase can't install Python packages with binary modules on mobile platforms.
See original GitHub issueDescribe the bug
Briefcase is able to package any an app that has a dependency that is a pure-Python package (i.e., a package that contains only Python code).
However, if you’re targeting a mobile platform (iOS or Android), and the Python module has a binary component (i.e., it contains a C module), any attempt to import that module will fail, causing the app to crash.
Desktop platforms (macOS, Windows and Linux) are not affected by this problem.
To Reproduce Steps to reproduce the behavior:
- Set up a hello world application
- Add a package with a binary dependency (e.g., numpy or pillow) to the
requires
list, and add an import for that code (e.g.,import numpy
orimport pil
) - Deploy the app to iOS or Android
- Try to run the app.
Expected behavior
The import should succeed and the app should continue to run.
Environment:
- Operating System: iOS or Android
- Python version: Any
- Software versions:
- Briefcase: Any
Additional context
This isn’t purely a Briefcase issue; pip and PyPI doesn’t currently have any support for mobile platforms.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:5
- Comments:30 (12 by maintainers)
Top Results From Across the Web
How to package Python apps with BeeWare Briefcase
Take advantage of BeeWare Briefcase to make Python programs that are a ... First, Briefcase doesn't do cross-platform packaging; you need to ...
Read more >Package Python Applications with BriefCase
briefcase run — Run the executable file for the platform. briefcase package — Post processing steps necessary to wrap the binary into an...
Read more >Frequently Asked Questions — Briefcase documentation
Yes! Briefcase uses pip to install third-party packages into your app bundle. As long as the package is available on PyPI, or you...
Read more >Installing Packages - Python Packaging User Guide - Python.org
This section covers the basics of how to install Python packages. ... of package that you import in your Python source code (i.e....
Read more >Tutorial 7 - Get this (third)-party started - BeeWare
On mobile and web platforms, your options are slightly limited. In short; any pure Python package (i.e., packages that do not contain a...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Is this limitation mentioned in the docs? I’ve run through the tutorials and only saw the “platform notice”. An explicit note would have saved me a good chunk of time 😞
I modified the hello world tutorial like so:
and the result:
Pull request incoming…