Page 1 of 1

Python Scripting Box : Error : No module named numpy

Posted: Thu Mar 23, 2017 9:38 pm
by deejay6
I am trying to run the basic examples that come with openvibe like Signal Average.py etc codes within Python Scripting boxes, It gives a error no module named Numpy even though numpy is installed, I installed canopy, also installed numpy using pip, and in the command prompt it all works as importing numpy.

Here are the specs :Windows 7 32 bit, Python 2.7.( i had to downgrade to a all this to even get hello world scripting box work)

Any help is greatly appreciated.

Thanks
DJ

Re: Python Scripting Box : Error : No module named numpy

Posted: Mon Apr 03, 2017 7:08 am
by jtlindgren
Hi DJ,

hard to say for sure what could be the problem. Have you checked that everything is set up according to the OpenViBE python tutorial?

I jush tried the box with ov 1.3.0, Python 2.7.11 32bit, numpy 1.12.1, Windows10 64bit, and it works ok (sinus oscillator tutorial relies on numpy). I don't have Anaconda or any other such distro, just vanilla python with numpy put in by pip.

Speculation: perhaps you have a problem from multiple python installations on the same machine. You should make sure all python related stuff (in registry, and env variables PATH, PYTHONHOME, PYTHONPATH) point to the 2.7 series of python.


Cheers,
Jussi

Re: Python Scripting Box : Error : No module named numpy

Posted: Tue Apr 04, 2017 4:49 am
by deejay6
Thanks for your response Jussi !

Now I uninstalled Python 2.7.3 and installed 2.7.11 and everything exactly as your settings on win 10 64bit etc. Also installed numpy using pip.
Now the python box also dissapeaerd from scripting.

Could you help how would I go about changing/cleaning the registries/ PATH ( I have added Python27 to the Env variables).

Thanks.

Re: Python Scripting Box : Error : No module named numpy

Posted: Tue Apr 04, 2017 8:50 am
by jtlindgren
If the python box disappears, you should have some printout in the console (the black window, not the graphical user interface one). What does it say? I assume you're not building openvibe yourself.

Unfortunately if its really about conflicting versions of python, cleaning up python installations is unfortunately outside my competence and more a question to the python community. I'd google for it if I were you. :)


Cheers,
Jussi

Re: Python Scripting Box : Error : No module named numpy

Posted: Wed Apr 05, 2017 2:44 am
by deejay6
Thank you so much. I got it to work using older computer with Windows 7.

Re: Python Scripting Box : Error : No module named numpy

Posted: Wed Apr 05, 2017 7:43 am
by jtlindgren
Hi Deejay, good to hear. Was there anything particular to do? The solution might help others if they run into the same problem.

Thanks,
Jussi

Re: Python Scripting Box : Error : No module named numpy

Posted: Thu Apr 06, 2017 4:57 pm
by deejay6
I think I deleted registry and reinstalled python 2.7.11 instead of what I had 2.7.3.

Re: Python Scripting Box : Error : No module named numpy

Posted: Mon May 24, 2021 5:58 pm
by m.casso-echalar
Hello,
I am having the same issue with Openvibe v. 3.1.0 and python 3.7.8.
In my script, I am also working with the pygame library so I'm not sure how the NumPy library has this issue.

Code: Select all

[ ERROR ] At time 0.000 sec <Box algorithm::(0x00003ff3, 0x00002dd4) aka Python 3 scripting> Failed to run [C:/Users/Public/Documents/openvibe-3.1.0-64bit/pygametest.py], result = -1
[  INF  ] At time 0.000 sec <Box algorithm::(0x00003ff3, 0x00002dd4) aka Python 3 scripting> executing script file
pygame 2.0.1 (SDL 2.0.14, Python 3.7.8)
Hello from the pygame community. https://www.pygame.org/contribute.html
error
Traceback (most recent call last):
  File "<string>", line 31, in execfileHandlingException
  File "C:/Users/Public/Documents/openvibe-3.1.0-64bit/pygametest.py", line 9, in <module>
    import numpy as np
ModuleNotFoundError: No module named 'numpy'
Does someone know what could be the issue? Thank you in advance!

Re: Python Scripting Box : Error : No module named numpy

Posted: Tue May 25, 2021 7:13 am
by Thomas
Hi,

The pygametest.py script is trying to import numpy, but it is not part of your python installation... yet!

To install it, you need to run the following command in a terminal: pip3.7.exe install numpy.

For info, the executable pip3.7.exe is located in your python install folder, under the Scripts folder.

If you get other errors of the kind "no module name...", repeat this operation for the missing modules.

Hope this helps,
Thomas

Re: Python Scripting Box : Error : No module named numpy

Posted: Tue May 25, 2021 7:41 am
by m.casso-echalar
Hello,
it worked thank you for your time and help!