我正在按照本教程設置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