GithubHelp home page GithubHelp logo

Comments (12)

tcaduser avatar tcaduser commented on July 20, 2024

This looks like it is the same issue as #2675. It looks like matplotlib needs to have need_stl_shared=True in its recipe, so that the c++ runtime library is installed.

from python-for-android.

shixiangheng avatar shixiangheng commented on July 20, 2024

This looks like it is the same issue as #2675. It looks like matplotlib needs to have need_stl_shared=True in its recipe, so that the c++ runtime library is installed.

Hi, thank you for your help! Could you specify which file I need to change? at what location?

from python-for-android.

tcaduser avatar tcaduser commented on July 20, 2024

If you are installed in a virtual environment, look in $VIRTUAL_ENV/lib/ for the pythonforandroid/recipes/matplotlib/__init__.py and put:

need_stl_shared=True

with the other global variables in the recipe class. If that fixes your problem, please consider making a pull request so others can benefit from it.

from python-for-android.

tcaduser avatar tcaduser commented on July 20, 2024

Actually my suggestion might not work at all, since matplotlib is a C++ recipe, and it should be including the library already

from python-for-android.

RobertFlatt avatar RobertFlatt commented on July 20, 2024

Read the last paragraph here https://github.com/Android-for-Python/Android-for-Python-Users#install

The error reported is (failing to report) a memory usage error.
While what looks like an NDK limitation "should" not happen, the real issue may be memory usage.
Look for Python variables storing C memory references being garbage collected.
If in doubt use Python class variables not local variables.

from python-for-android.

shixiangheng avatar shixiangheng commented on July 20, 2024

If you are installed in a virtual environment, look in $VIRTUAL_ENV/lib/ for the pythonforandroid/recipes/matplotlib/__init__.py and put:

need_stl_shared=True

with the other global variables in the recipe class. If that fixes your problem, please consider making a pull request so others can benefit from it.

Yes, this one solved my problem I think. I changed the recipe.py file with "need_stl_shared=True". I also added this in the init.py file. I can see the canvas now after opening the app, so I believe the matplotlib dependency's problem is solved.

from python-for-android.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.