【发布时间】:2010-04-01 15:07:49
【问题描述】:
在 Django 开发服务器上一切正常。在 Apache 中,django 应用程序也可以工作,除非使用 matplotlib。这是我得到的错误:
No module named multiarray.
Exception Type: ImportError
Exception Value: No module named multiarray
Exception Location: /usr/share/pyshared/numpy/core/numerictypes.py in <module>, line 81
Python Executable: /usr/bin/python
Python Version: 2.6.4
在 python shell 中,两个语句都有效:import numpy.core.multiarray 和 import multiarray。有任何想法吗? 谢谢
当我查看 numpy 文件时,我发现了 multiarray 模块,它的扩展名为“so”。我的猜测是 mod_python 没有读取这些文件。
【问题讨论】:
-
如果你从 python shell 执行“from numpy.core.multiarray import typeinfo, ndarray, array, empty, dtype”会发生什么?
-
效果很好。没有错误消息。
-
我好像也有类似的问题。我正在运行 py2.6、cherrypy、IIS、isapi_wsgi。 Matplotlib 在 Python shell 中运行良好。当被 IIS 调用时,尝试加载 pyd 模块(例如 matplotlib._path)失败。我检查了 os.environ 和 sys.path。
-
e1i45:你运行的是什么版本的 matplotlib?我在 Ubuntu 上有 1.3.0。我在 Windows XP 上成功运行了 matplotlib 版本 1.4.0rc1。
-
我正在运行 matplotlib 版本 0.99.1
标签: django apache2 mod-wsgi mod-python