如何在mod_wsgi中使用uuid库? [英] How to use uuid lib with mod_wsgi?

查看:58
本文介绍了如何在mod_wsgi中使用uuid库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是回溯:

mod_wsgi: Target WSGI script '/[..]/project/wsgi.py' cannot be loaded as Python module.
mod_wsgi: Exception occurred processing WSGI script '/[..]/project/wsgi.py'.

Traceback (most recent call last):
   File "/home/ubuntu/api/api/wsgi.py", line 11, in <module>
     import uuid as uuid
   File "/home/ubuntu/.virtualenvs/api/lib/python3.4/site-packages/uuid.py", line 138
     if not 0 <= time_low < 1<<32L:
                                 ^
 SyntaxError: invalid syntax

不确定问题出在哪里... uuid.py lib有bug吗?

Not sure where the problem lies... has the uuid.py lib a bug?

推荐答案

uuid自版本2.5起与python捆绑在一起,请参见文档,您不应将其安装在虚拟环境中.

uuid is bundled with python since version 2.5, see docs, you should not install it in your virtual environment.

无需安装.

这篇关于如何在mod_wsgi中使用uuid库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆