當我嘗試使用pip-3.3安裝Pillow時,我得到了一個錯誤,請參閱下面的回溯。由於UnicodeDecodeError無法安裝PIL
File "/home/samsun/workspace/python/chat_environment/lib/python3.3/site-packages/pip/req.py", line 297, in egg_info_data
data = fp.read()
File "/home/samsun/workspace/python/chat_environment/lib/python3.3/encodings/ascii.py", line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 14439: ordinal not in range(128)
我認爲回溯告訴我該文件中的某些字符都是Unicode,但是Python使用ASCII來讀取文件。
我想改變python3.3 filesystemencoding來解決這個錯誤;有沒有辦法改變默認的文件系統編碼?
是什麼讓你認爲改變默認的文件系統編碼可以解決你的問題?無論如何,通常默認是**而不是** ASCII。你給了什麼命令?什麼是完整的回溯? –
我改變了我的問題。請幫我解決這個問題。非常感謝 –
你到底做了什麼?什麼是命令行,並且您是否使用了requirements.txt文件? –