首页 > 解决方案 > Apache 服务器上的 Scipy 崩溃

问题描述

我有一个使用 NLTK 的 Python 2.7 脚本,它在命令提示符下运行良好。当我在同一台机器上的本地 Apache 服务器上运行它时,它崩溃了,并且在加载 scipy 时错误日志显示“NotImplementedError:无法确定 CPU 的数量”。更详细的消息如下所示。其他人有同样的问题吗?

..... [Thu Aug 09 18:07:50 2018] [error] [client ::1] 文件“interpnd.pyx”,第 1 行,在 init scipy.interpolate.interpnd\r 中,引用:http:/ /localhost/index.html [Thu Aug 09 18:07:50 2018] [error] [client ::1] 文件“C:\Anaconda2\lib\site-packages\scipy\spatial\__init__.py”,第 95 行,在 \r 中,引用者:http://localhost/index.html [Thu Aug 09 18:07:50 2018] [错误] [client ::1] from .ckdtree import *\r,引用者:http:// localhost/index.html [Thu Aug 09 18:07:50 2018] [error] [client ::1] 文件“ckdtree.pyx”,第 31 行,在 init scipy.spatial.ckdtree\r 中,引用者:http:// /localhost/index.html [Thu Aug 09 18:07:50 2018] [error] [client ::1] 文件“C:\Anaconda2\lib\multiprocessing\__init__.py”,第 136 行,在 cpu_count\r 中,推荐人:http://localhost/index.html [Thu Aug 09 18:07:50 2018] [error] [client ::1] raise NotImplementedError('cannot determine number of cpus')\r, referer: http://localhost /index.html [Thu Aug 09 18:07:50 2018] [error] [client ::1] NotImplementedError: cannot determine number of cpus\r, referer: http://localhost/index.html

标签: pythonapachescipynltk

解决方案


推荐阅读