kivy / kivy/python-for-android
Enhancement request: add documentation that your venv must not be in the project folder
- Dominant language
- Python
- Stars
- 8.9k
- Forks
- 2k
- Avg merge
- 12h 20m
- Merged PRs (30d)
- 9
Description
I had encountered a mysterious issue where my project would appear to build cleanly, but python packages would sometimes go missing while trying to run the app.
Specifically, the app would crash during launch and any number of ModuleNotFoundErrors would appear in the logcat.
E.g. `ModuleNotFoundError: No module named 'paramiko'`
This behavior only appeared when certain packages were added, which made it more confusing. Using just python, kivy, and numpy, for example, caused no problems. (Might be related to things with recipes? Hard to tell)
This happened even when the various suggestions in the [troubleshooting guide](https://github.com/Android-for-Python/Android-for-Python-Users#non-deterministic-behavior) were followed, such as completely wiping the build and starting over, explicitly adding the full dependency tree(s) to the .spec requirements, ensuring nothing would cause non-deterministic behavior, etc.
What finally solved the issue was the realization that having my virtual environment folder **within** the project folder caused some kind of interference with the process (even though it was supposedly being ignored via the `source.exclude_dirs` parameter in the .spec file) .
### Summary
Please add documentation that including your virtual environment folder within your project's folder (where it will be seen by buildozer/p4a) can/will prevent the app from running even if it builds without obvious issues.
Contributor guide
Research direction
Start with the linked troubleshooting guide and inspect the repository's documentation structure for the appropriate placement. Done means the documentation clearly warns that a virtual environment inside the project directory can interfere with buildozer/python-for-android, and explains where to keep it instead.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, python
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100