cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements

Community Helping Community

377
Views
0
Helpful
2
Replies
Highlighted
Beginner

How to use numpy module for Python on IR829(IOx)?

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)

Everyone's tags (4)
2 REPLIES 2
Cisco Employee

Re: How to use numpy module for Python on IR829(IOx)?

You may access the app console for debugging and troubleshooting.

https://developer.cisco.com/site/iox/docs/#debugging

Beginner

Re: How to use numpy module for Python on IR829(IOx)?

I think the cause is because numpy needs fortran.

Thank you for answering.

CreatePlease to create content
Content for Community-Ad
FusionCharts will render here