python - 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
解决方案
推荐阅读
- c - 是否定义了递增 _Bool?
- android - 如何将flutter aar发布到神器
- spring-boot - 使用 QueryDsl 和布尔表达式连接
- c - 为什么我的法线贴图不能在球体上正常工作?
- javascript - 如何在 Javascript 中访问 ExchangeUser() 对象
- python - 如何使用多处理来更快地运行一个函数?
- matlab - 命名工作区变量并将其保存到名称中更改数字的文件中 - Matlab
- python - 为什么算法不接受浮点数?
- python - [[WinError 2]] 系统找不到指定的文件:'desktop.ini'
- javascript - Firebase 功能不适用于 axios