09-21-2017 01:23 AM
Is there a way to use the numpy module for Python in the IR829?
Please teach me how to use numpy module on IOx.
I make the following PaaS App and deploy it.
Deployment successfully complete, but App Status: STOPPED after a few seconds.
requirements.txt
flask
numpy
main.py
from flask import Flask
import numpy as np
app = Flask(__name__)
@app.route('/')
def test_numpy():
test = np.arange(10)
return str(test[0])
if __name__ == '__main__':
app.run(host='0.0.0.0',port=9000)
the following error occur(WATCHDOG.LOG):
APP START TIME:1505979890 App NumTest started with PID : 231 Monitoring this process now App TestApp completed with exit code: 1 APP END TIME:1505979890 Time taken by App : 0 minutes and 0 seconds. Stopping the container
So I change main.py to the following.
It's RUNNING.
main.py
from flask import Flask
#import numpy as np
app = Flask(__name__)
@app.route('/')
def test_numpy():
#test = np.arange(10)
return "Hello World"
if __name__ == '__main__':
app.run(host='0.0.0.0',port=9000)
09-27-2017 08:19 PM
You may access the app console for debugging and troubleshooting.
09-27-2017 08:55 PM
I think the cause is because numpy needs fortran.
Thank you for answering.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide