0

I am facing a problem while running a Python-Numpy webapp. My PHP code is calling the Python-Numpy code by using:

popen("python compilation.py $redline $workload $timestep", "r")

The app is working in my local MAMP server. However, when I am trying to run in from my website it is not running. In AWS EC2 console, an error is coming up:

Traceback (most recent call last):
    File "compilation.py", line 2, in
        import numpy as np
ImportError: No module named numpy

It seems the problem is with numpy. I have successfully run a small test code in Python.

ali_m
  • 71,714
  • 23
  • 223
  • 298

1 Answers1

0

NumPy is not part of the standard library. You can install it either using the package manager of whatever Linux instance you have chosen, or there are also Community AMIs with Anaconda/Miniconda preinstalled.

Community
  • 1
  • 1
YXD
  • 31,741
  • 15
  • 75
  • 115