Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
152 views
in Technique[技术] by (71.8m points)

python - Flask hangs after importing pandas (also numpy, matplotlib etc.)

Why is Flask hanging after importing the pandas lib or several other scientific libs? It still works, when running it locally via SSH, but when visiting the URL the browser loads and loads and nothing happens.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

The solution is for Ubuntu with Apache2 server. You have to configure the following file:

/etc/apache2/sites-available/your-flask-app-file.conf

paste the following line below WSGIScriptAlias:

WSGIApplicationGroup %{GLOBAL}  

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...