我正在按照本教程设置uwsgi:https://uwsgi.readthedocs.org/en/latest/tutorials/Django_and_nginx.html。 我跑的virtualenv内pip install uwsgi
,但得到如下问题:'ascii'编解码器在使用pip安装时无法解码错误uwsgi
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
只是猜测尝试运行'LC_ALL = C PIP安装uwsgi' – twil
@twil似乎解决解码错误,但它更改为另一个错误。你认为这是一个完全不同的错误?命令/ usr/bin/python -c“import setuptools; __file __ ='/ home/timyitong/superleagues/build/uwsgi/setup.py'; execfile('/ home/timyitong/superleagues/build/uwsgi/setup.py' )“install --single-version -external-managed --record /tmp/pip-hMl7E8-record/install-record.txt --install-headers/home/timyitong/superleagues/lib/include失败,错误代码为1 –
是的,它看起来像完全不同的问题。你正在安装什么平台?我刚刚在Ubuntu 13.04中安装了'uwsgi'到virtualenv,没有任何问题。 – twil