Using scipy.stats.stats in django after deployment

烈酒焚心 提交于 2019-12-01 05:50:59

mod_python used to try using multiple Python interpreters in the same process. mod_wsgi might be doing the same. While this frequently works okay, some extension modules do not support this. scipy.stats is probably importing such an extension module. We have had similar reports on the scipy mailing list concerning scipy.stats under mod_python. Check the mod_wsgi documentation to see if you can configure it such that it does not use multiple interpreters in the same process, or find a different deployment strategy that uses one interpreter per process for the app.

I also encounter this problem when I use scipy.stats in my django application. In django manage.py runsever environment, my app is executed correctly without any problem. But when I deploy the app to apache server with mod_python, I can't enter my app, and the browser keep loading until the time out. After I remove all imported scipy.stats statements in my app, the problem is solved, and I can execute my app in the apache server.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!