Unable to install numpy in Help

Hello Everyone. I have been trying to deploy a flask app using gunicorn. I first tried to replicate this tutorial:
https://www.vultr.com/docs/how-to-setup-gunicorn-to-serve-python-web-applications

I did that successfully. I now tried to do the same with my app and had to use pip to install modules not in the tutorial like numpy. It could not install it. The pip.log shows this error" (I would have uploaded the entire log file but I can't see a way to do so):

"RuntimeError: Broken toolchain: cannot link a simple C program"

Please can anyone give me pointers on how to overcome this hurdle? Numpy is really critical for my app.

Thanks

Comments

  • EDIT: Hello I have tried another distro (CentOS 7 x64) and I have been able to install all the modules and complete the deployment process but when I try to access the app in the browser, it doesn't load and eventually time's out. I am new to flask, gunicorn, nginx and vultr so I am not sure what I could be doing wrong. Since this is Centos, I put the /location config in file, /etc/nginx/nginx.conf. I used virtualenv to create the folder control_search and placed my python source file control_search.py there. The structure of the file is as follows:

    import requests
    ....
    from flask import Flask,render_template,request,jsonify

    app = Flask(__name__)
    @app.route('/')
    def open_layer():
    return render_template("index.html")
    @app.route('/compute',methods=['POST', 'GET'])
    def compute_paths():
    ....
    ....
    ....
    if __name__ == '__main__':
    app.run(debug=True)

    I have a templates folder located inside the control_search folder that contains the index.html. The idea is for the index.html file to be loaded in the browser.
    I have tried starting gunicorn with both:

    gunicorn -w 2 control_search:open_layer &
    gunicorn -w 2 control_search:app &

    to no avail. I would be really grateful for some suggestions on what I ought to do to get things to work.

    Thanks
  • EDIT: Hello I have tried another distro (CentOS 7 x64) and I have been able to install all the modules and complete the deployment process but when I try to access the app in the browser, it doesn't load and eventually time's out. I am new to flask, gunicorn, nginx and vultr so I am not sure what I could be doing wrong. Since this is Centos, I put the /location config in file, /etc/nginx/nginx.conf. I used virtualenv to create the folder control_search and placed my python source file control_search.py there. The structure of the file is as follows:

    import requests
    ....
    from flask import Flask,render_template,request,jsonify

    app = Flask(__name__)
    @app.route('/')
    def open_layer():
    return render_template("index.html")
    @app.route('/compute',methods=['POST', 'GET'])
    def compute_paths():
    ....
    ....
    ....
    if __name__ == '__main__':
    app.run(debug=True)

    I have a templates folder located inside the control_search folder that contains the index.html. The idea is for the index.html file to be loaded in the browser.
    I have tried starting gunicorn with both:

    gunicorn -w 2 control_search:open_layer &
    gunicorn -w 2 control_search:app &

    to no avail. I would be really grateful for some suggestions on what I ought to do to get things to work.

    Thanks
Sign In or Register to comment.

Registration Required

A VULTR.com account is required to use the forum. Click here to sign in.

Quick Links

In this Discussion