# Processing.py: Numpy import error

**URL:** <https://discourse.processing.org/t/processing-py-numpy-import-error/10935>\
**Category:** Processing.py\
**Created:** [May 5, 2019, 9:53am UTC](https://discourse.processing.org/t/processing-py-numpy-import-error/10935 "2019-05-05T09:53:52Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![LoliProcessor](https://avatars.discourse-cdn.com/v4/letter/l/6a8cbe/32.png) [@LoliProcessor](https://discourse.processing.org/u/LoliProcessor)\
**Post date:** [May 5, 2019, 9:53am UTC](https://discourse.processing.org/t/processing-py-numpy-import-error/10935/1 "2019-05-05T09:53:52Z")

</div>

> 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 have already reinstalled and that did not fix the problem, then:
> 1. Check that you are using the Python you expect (you’re using C:\DDOX\xXhackerlordXx\processing\sketchbook\modes\PythonMode\mode\bin\jython.exe),  
> and that you have no directories in your PATH or PYTHONPATH that can  
> interfere with the Python and numpy versions you’re trying to use.
> 
> 2. If (1) looks fine, you can open a new issue at  
> [Issues · numpy/numpy · GitHub](https://github.com/numpy/numpy/issues). Please include details on:
> 
> Original error was: No module named \_multiarray\_umath

I am importing numpy and pandas.  
Of course I have numpy in my normal site-packages in my python/lib, but I copied it to site-packages since otherwise I would get ImportError: No module named numpy.  
I pip upgraded numpy and pandas as they are both up-to-date as it seems.  
Any suggestions?

---

<div class="post-metadata">

**Author:** ![monkstone](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/monkstone/32/64_2.png) [@monkstone](https://discourse.processing.org/u/monkstone)\
**Post date:** [May 5, 2019, 10:22am UTC](https://discourse.processing.org/t/processing-py-numpy-import-error/10935/2 "2019-05-05T10:22:14Z")

</div>

See [https://github.com/jdf/processing.py/wiki](https://github.com/jdf/processing.py/wiki), you cannot use numpy as it has a native component.

---

<div class="post-metadata">

**Author:** ![LoliProcessor](https://avatars.discourse-cdn.com/v4/letter/l/6a8cbe/32.png) [@LoliProcessor](https://discourse.processing.org/u/LoliProcessor)\
**Post date:** [May 5, 2019, 5:13pm UTC](https://discourse.processing.org/t/processing-py-numpy-import-error/10935/3 "2019-05-05T17:13:35Z")

</div>

does native component mean C code?

---

<div class="post-metadata">

**Author:** ![monkstone](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/monkstone/32/64_2.png) [@monkstone](https://discourse.processing.org/u/monkstone)\
**Post date:** [May 5, 2019, 6:00pm UTC](https://discourse.processing.org/t/processing-py-numpy-import-error/10935/4 "2019-05-05T18:00:07Z")

</div>

Yes [https://docs.scipy.org/doc/numpy-1.13.0/reference/c-api.html](https://docs.scipy.org/doc/numpy-1.13.0/reference/c-api.html), and I’m pretty sure there is not a java alternative. The mdarray (jruby) is similar, which theoretically would be usable, but probably not performant.

---

<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:** [May 7, 2019, 3:23am UTC](https://discourse.processing.org/t/processing-py-numpy-import-error/10935/5 "2019-05-07T03:23:57Z")

</div>

You can only run pure python libraries (no C) – so numpy is out. This is a limitation of Jython 2.7.

However, depending on what you are trying to do with numpy / pandas, there might be a pure python library that could give you an equivalent. For example:

> **[wadetb/tinynumpy](https://github.com/wadetb/tinynumpy)**
>
> A lightweight, pure Python, numpy compliant ndarray class. - wadetb/tinynumpy

---

<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:** [May 7, 2019, 8:09pm UTC](https://discourse.processing.org/t/processing-py-numpy-import-error/10935/6 "2019-05-07T20:09:48Z")

</div>

> **[LaplaceDemon/numjar](https://github.com/LaplaceDemon/numjar)**
>
> Implement numpy with java. Contribute to LaplaceDemon/numjar development by creating an account on GitHub.

- [GitHub.com/search?l=Java&o=desc&q=numpy&s=updated&type=Repositories](http://GitHub.com/search?l=Java&o=desc&q=numpy&s=updated&type=Repositories)
