# Can't get numpy to work

**URL:** <https://discourse.processing.org/t/cant-get-numpy-to-work/18002>\
**Category:** Processing.py\
**Created:** [February 22, 2020, 7:08am UTC](https://discourse.processing.org/t/cant-get-numpy-to-work/18002 "2020-02-22T07:08:27Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![ctrembla](https://avatars.discourse-cdn.com/v4/letter/c/aeb1de/32.png) [@ctrembla](https://discourse.processing.org/u/ctrembla)\
**Post date:** [February 22, 2020, 7:08am UTC](https://discourse.processing.org/t/cant-get-numpy-to-work/18002/1 "2020-02-22T07:08:27Z")

</div>

I’m trying to learn reinforcement learning & all the tutorials I found so far use a program called numpy or something called numpy. I’ve downloaded it & unzipped it, but still get there no module named numpy. Can someone help me fix the problem or point to some stuff that don’t use it

---

<div class="post-metadata">

**Author:** ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)\
**Post date:** [February 22, 2020, 7:16am UTC](https://discourse.processing.org/t/cant-get-numpy-to-work/18002/2 "2020-02-22T07:16:32Z")

</div>

> [@Processing.py: Numpy import error](https://discourse.processing.org/t/processing-py-numpy-import-error/10935):
>
> ImportError: IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE! Importing the multiarray numpy extension module failed. Most likely you are trying to import a failed build of numpy. Here is how to proceed: If you’re working with a numpy git repository, try git clean -xdf (removes all files not under version control) and rebuild numpy. If you are simply trying to use the numpy version that you have installed: your installation is broken - please reinstall numpy. If you h…

---

<div class="post-metadata">

**Author:** ![ctrembla](https://avatars.discourse-cdn.com/v4/letter/c/aeb1de/32.png) [@ctrembla](https://discourse.processing.org/u/ctrembla)\
**Post date:** [February 22, 2020, 7:20am UTC](https://discourse.processing.org/t/cant-get-numpy-to-work/18002/3 "2020-02-22T07:20:43Z")

</div>

guess i’m not using it. time to find a place that don’t use it. Any advice?

---

<div class="post-metadata">

**Author:** ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)\
**Post date:** [February 22, 2020, 7:26am UTC](https://discourse.processing.org/t/cant-get-numpy-to-work/18002/4 "2020-02-22T07:26:37Z")

</div>

This is the main tutorial page about Processing’s Python Mode (Jython-based) flavor: 🐍  
[Py.Processing.org/tutorials/](http://Py.Processing.org/tutorials/)

For the original C-based Python, go here: 😉

> **[Welcome to Python.org](https://www.python.org/)**
>
> The official home of the Python Programming Language

---

<div class="post-metadata">

**Author:** ![ctrembla](https://avatars.discourse-cdn.com/v4/letter/c/aeb1de/32.png) [@ctrembla](https://discourse.processing.org/u/ctrembla)\
**Post date:** [February 22, 2020, 7:30am UTC](https://discourse.processing.org/t/cant-get-numpy-to-work/18002/5 "2020-02-22T07:30:05Z")

</div>

I don’t see reinforcement learning in those tutorials

---

<div class="post-metadata">

**Author:** ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)\
**Post date:** [February 22, 2020, 7:34am UTC](https://discourse.processing.org/t/cant-get-numpy-to-work/18002/6 "2020-02-22T07:34:21Z")

</div>

I dunno what kinda tutorials are those. But I bet they require the original Python. 🤔

---

<div class="post-metadata">

**Author:** ![tabreturn](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/tabreturn/32/3697_2.png) [@tabreturn](https://discourse.processing.org/u/tabreturn)\
**Post date:** [February 22, 2020, 7:51am UTC](https://discourse.processing.org/t/cant-get-numpy-to-work/18002/7 "2020-02-22T07:51:18Z")

</div>

[Thonny](https://thonny.org/) is a quick and easy way to get Python set up and running. It comes bundled with an editor and Python. You can install numpy from the Thonny package manager (Tools \> Manage Packages).

---

<div class="post-metadata">

**Author:** ![ctrembla](https://avatars.discourse-cdn.com/v4/letter/c/aeb1de/32.png) [@ctrembla](https://discourse.processing.org/u/ctrembla)\
**Post date:** [February 22, 2020, 7:52am UTC](https://discourse.processing.org/t/cant-get-numpy-to-work/18002/8 "2020-02-22T07:52:37Z")

</div>

ty I got python on my computer just trying to learn how to do reinforcement learning and every dumb tutorial says use python & a bunch of libraries

---

<div class="post-metadata">

**Author:** ![tabreturn](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/tabreturn/32/3697_2.png) [@tabreturn](https://discourse.processing.org/u/tabreturn)\
**Post date:** [February 22, 2020, 8:05am UTC](https://discourse.processing.org/t/cant-get-numpy-to-work/18002/9 "2020-02-22T08:05:56Z")

</div>

You can add Python packages using [pip](https://pypi.org/project/pip/). You might need to install it first, then open your command-line/terminal and type:

```auto
pip install numpy

```

IDEs like Thonny and PyCharm include package managers that handle this process for you.

---

<div class="post-metadata">

**Author:** ![ctrembla](https://avatars.discourse-cdn.com/v4/letter/c/aeb1de/32.png) [@ctrembla](https://discourse.processing.org/u/ctrembla)\
**Post date:** [February 22, 2020, 11:18pm UTC](https://discourse.processing.org/t/cant-get-numpy-to-work/18002/10 "2020-02-22T23:18:16Z")

</div>

I really starting to hate how you need hundred libraries to do one simple thing

---

<div class="post-metadata">

**Author:** ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)\
**Post date:** [February 23, 2020, 4:54am UTC](https://discourse.processing.org/t/cant-get-numpy-to-work/18002/11 "2020-02-23T04:54:37Z")

</div>

Python works with numpy.

Processing.py does not and will not work with numpy. For why, see:

> **[GitHub - jdf/processing.py: Write Processing sketches in Python](https://github.com/jdf/processing.py)**
>
> Write Processing sketches in Python. Contribute to jdf/processing.py development by creating an account on GitHub.

> Does this mean I can use SciPy!? NumPy!?
> 
> No. Processing’s Python Mode is implemented in Java, and relies on the Jython project’s implementation of the Python programming language. You _can_ use any “pure Python” module, meaning any Python

---

<div class="post-metadata">

**Author:** ![SomeOne](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/someone/32/8639_2.png) [@SomeOne](https://discourse.processing.org/u/SomeOne)\
**Post date:** [February 29, 2020, 7:38am UTC](https://discourse.processing.org/t/cant-get-numpy-to-work/18002/12 "2020-02-29T07:38:01Z")

</div>

I would recommend using Anaconda with all machine learning related activities. Installing python with it installs numpy, pandas, scikit-learn etc. libraries used with machine learning. You might need to install Tensorflow and Keras to do Deep Learning based transfer learning, but that too can be done by Anaconda.

---

<div class="post-metadata">

**Author:** ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)\
**Post date:** [February 29, 2020, 5:34pm UTC](https://discourse.processing.org/t/cant-get-numpy-to-work/18002/13 "2020-02-29T17:34:04Z")

</div>

If you want to use Processing visualization with python3, check out p5py.

> **[p5py/p5](https://github.com/p5py/p5)**
>
> p5 is a Python package based on the core ideas of Processing. - p5py/p5

Note it does not interface with Java libraries.

---

<div class="post-metadata">

**Author:** ![ctrembla](https://avatars.discourse-cdn.com/v4/letter/c/aeb1de/32.png) [@ctrembla](https://discourse.processing.org/u/ctrembla)\
**Post date:** [March 2, 2020, 5:57am UTC](https://discourse.processing.org/t/cant-get-numpy-to-work/18002/14 "2020-03-02T05:57:34Z")

</div>

I got it working. Then the tutorial I was watching switched from reinforcement learning to supervised learning.

---

<div class="post-metadata">

**Author:** ![doni](https://avatars.discourse-cdn.com/v4/letter/d/a698b9/32.png) [@doni](https://discourse.processing.org/u/doni)\
**Post date:** [October 30, 2022, 9:07am UTC](https://discourse.processing.org/t/cant-get-numpy-to-work/18002/15 "2022-10-30T09:07:38Z")

</div>

are you get Numpy working with processing.py mode? how

---

<div class="post-metadata">

**Author:** ![tabreturn](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/tabreturn/32/3697_2.png) [@tabreturn](https://discourse.processing.org/u/tabreturn)\
**Post date:** [October 30, 2022, 9:20am UTC](https://discourse.processing.org/t/cant-get-numpy-to-work/18002/16 "2022-10-30T09:20:24Z")

</div>

It won’t work @doni, because Processing.py uses Jython:  
[https://py.processing.org/tutorials/python-jython-java/](https://py.processing.org/tutorials/python-jython-java/)

I don’t know what you’d like to accomplish. If you explain, we might suggest an alternative approach. You could try [py5](https://py5coding.org/) instead of Processing.py.

---

<div class="post-metadata">

**Author:** ![doni](https://avatars.discourse-cdn.com/v4/letter/d/a698b9/32.png) [@doni](https://discourse.processing.org/u/doni)\
**Post date:** [April 17, 2023, 11:27pm UTC](https://discourse.processing.org/t/cant-get-numpy-to-work/18002/17 "2023-04-17T23:27:27Z")

</div>

hi. i am sorry for late reply. before i want to build raspberry pi lane detection with processing editor. but now i want to try change to use opencv in android mode (android phone as machine). so would you like to suggest what processing library have same function as numPy. thank you

---

<div class="post-metadata">

**Author:** ![solub](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/solub/32/333_2.png) [@solub](https://discourse.processing.org/u/solub)\
**Post date:** [April 18, 2023, 2:15pm UTC](https://discourse.processing.org/t/cant-get-numpy-to-work/18002/18 "2023-04-18T14:15:50Z")

</div>

> [@doni](#):
>
> what processing library have same function as numPy

If you have to deal with vectors and matrices in Processing Python mode, [mpmath](https://mpmath.org/) can be an option. It has some handy methods that are reminiscent of Numpy’s although they are significantly slower (pure Python, no vectorized operations).

See doc [here](https://mpmath.org/doc/current/matrices.html).

Other than that, I remember using [EJML](http://ejml.org/wiki/index.php?title=Main_Page) without trouble in Python mode.

---

<div class="post-metadata">

**Author:** ![doni](https://avatars.discourse-cdn.com/v4/letter/d/a698b9/32.png) [@doni](https://discourse.processing.org/u/doni)\
**Post date:** [April 18, 2023, 2:47pm UTC](https://discourse.processing.org/t/cant-get-numpy-to-work/18002/19 "2023-04-18T14:47:47Z")

</div>

thank you brother will try your suggestion
