My problem is that i can't import numpy into my processing.py project. When I try to import it i get the error "No module named numpy". What can I do?
1 Answer
Processing is built on top of the JVM so the Python mode of Processing uses Jython rather than CPython. Unfortunately, numpy doesn't support Jython. Thus, you are trying to do something which is impossible. From the SciPy FAQ:
Q: Does NumpPy/SciPy work with Jython or C#/.Net?
A: No, neither are supported. Jython never worked, because it runs on top of the Java Virtual Machine and has no way to interface with extensions written in C for the standard Python (CPython) interpreter."
This question discusses some alternatives to numpy which can be used from Jython. The official Jython FAQ recommends JNumeric.
pip install numpy