我正在按照本教程设置 uwsgi:https ://uwsgi.readthedocs.org/en/latest/tutorials/Django_and_nginx.html 。我pip install uwsgi
在 virtualenv 中运行,但得到如下问题:
Command /home/timyitong/superleagues/bin/python -c "import setuptools;__file__='/home/timyitong/superleagues/build/uwsgi/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-Z9h8Jn-record/install-record.txt --single-version-externally-managed --install-headers /home/timyitong/superleagues/include/site/python2.6 failed with error code 1 in /home/timyitong/superleagues/build/uwsgi
Traceback (most recent call last):
File "/home/timyitong/superleagues/bin/pip", line 9, in <module>
load_entry_point('pip==1.4', 'console_scripts', 'pip')()
File "/home/timyitong/superleagues/lib/python2.6/site-packages/pip/__init__.py", line 148, in main
return command.main(args[1:], options)
File "/home/timyitong/superleagues/lib/python2.6/site-packages/pip/basecommand.py", line 169, in main
text = '\n'.join(complete_log)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 54: ordinal not in range(128)
这似乎是一个解码问题,但如何解决呢?我的系统环境是:
Ubuntu 10.04
Django==1.5.1
South==0.8.1
distribute==0.7.3
wsgiref==0.1.2
注意:此问题的答案可能因操作环境不同而有所不同。Twil 的评论实际上解决了我在 OS X 中的问题。