在Windows下运行图像上传示例代码时缺少多处理

时间:2011-11-27 05:17:36

标签: python google-app-engine

我尝试完全按照http://code.google.com/appengine/docs/python/images/usingimages.html

中发布的图片上传代码进行操作

我使用以下app.yaml文件

application: jstock-webapp
version: 1
runtime: python
api_version: 1

handlers:
- url: /*
  script: upload.py
- url: /sign
  script: upload.py
- url: /img
  script: upload.py  

我收到以下错误。

<type 'exceptions.ImportError'>: No module named _multiprocessing
      args = ('No module named _multiprocessing',)
      message = 'No module named _multiprocessing'

enter image description here

我通过启动c:\Python26\python.exe

来检查我的Python运行时环境

我得到以下输出

Python 2.6.2 (r262:71605, Apr 14 2009, 22:40:02) [MSC v.1500 32 bit (Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import multiprocessing
>>>

我有什么遗漏的吗?

1 个答案:

答案 0 :(得分:1)

当您尝试导入_multiprocessing而不是multiprocessing时会出现问题。

请参阅this thread了解各种变通方法,其中最重要的是使用Python 2.5而不是2.6。更好的是,安装Python 2.7和update your app来定位它。