This is the traceback:
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
Not sure where the problem lies... has the uuid.py lib a bug?
uuid is bundled with python since version 2.5, see docs, you should not install it in your virtual environment.
There is no need to install it.
After wrestling with this today, what solved it for me was actually Daniel Roseman's comment.
If you're getting this error in Python 3, it's because you've inadvertently installed the uuid
Python 2 backport, which is masking the standard library uuid
, which is what you presumably want to import.
So:
pip uninstall uuid
to uninstall the extraneous backport.uuid
as a requirement for python versions greater than 2.5.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With