UnicodeDecodeError: 'utf-8' codec can't decode byte 闂
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了UnicodeDecodeError: 'utf-8' codec can't decode byte 闂相关的知识,希望对你有一定的参考价值。
鏍囩锛?a href='http://www.mamicode.com/so/1/nbsp' title='nbsp'>nbsp unicode 鍒涘缓 灏辨槸 鐜板湪 鍦板潃 鐩綍 tle www
鍦ㄥ鍏fd 鐨刲xml鍖呯殑鏃跺€欏嚭鐜?/p>
UnicodeDecodeError: 鈥榰tf-8鈥?codec can鈥榯 decode byte 闂锛岃繖涓椂鍊欓渶瑕佹鏌ョ數鑴戞敮鎸佺殑鍖呫€傛垜鐨勭數鑴戞槸amd64.
1 import pip._internal 2 print(pip._internal.pep425tags.get_supported())
闄勪笂Win32鐨勬煡璇㈡柟娉?/p>
1 import pip 2 print(pip.pep425tags.get_supported())
鏌ヨ缁撴灉
鐒跺悗鎵惧搴旂殑鍖呭氨濂戒簡銆傛垜鏄疨ython3.8鐨勶紝鎵€鏈夋壘cp38.
闄勪笂lfd鍦板潃锛?a title="lfd" href="https://www.lfd.uci.edu/~gohlke/pythonlibs/" target="_blank">https://www.lfd.uci.edu/~gohlke/pythonlibs/
濡傛灉瀵煎叆鎴愬姛鍚庯紝鍙戠幇鍦ㄧ紪璇戝櫒Pc鍙戠幇鏃犳硶浣跨敤銆傞偅灏辨槸鍐呴儴鐜闂
杩欎釜鏃跺€欓渶瑕佸垱寤鸿櫄鎷熺幆澧冿紝瑙佹楠?/p>
1銆佸畨瑁呰櫄鎷熺幆澧冨寘
1 pip install virtualenv
2銆佸彲鑳藉湪瀹夎杩囩▼鍑虹幇澶辫触 “UnicodeDecodeError: 鈥榰tf-8鈥?codec can鈥榯 decode byte”杩欎釜閿欒锛屾牴鎹畾浣嶇殑琛屽彿锛屽幓閲嶆柊瑙g爜锛?/p>
鐩存帴鍔犲叆decode锛坸xxx,鈥榠gnore鈥橈級;
瑙i噴涓嬩负浠€涔堝姞鍏ヨ繖涓紝鍥犱负鎴戜箣鍓嶇涓婅繃杩欎釜闂锛屽墠闈㈡垜璁板緱閭d釜浠g爜宸茬粡鏄痵tr绫诲瀷鐨勶紝鐒跺悗濡傛灉浣犲湪瑙g爜涓簎tf-8灏变細鍑洪敊锛岃繖涓椂鍊欎綘鏀规垚ignore灏卞ソ浜嗐€傚洜涓虹粨鏋滀笉鍦ㄦ垜鐨勭數鑴戜笂锛屾病娉曟埅鍥俱€?/span>
鍚庨潰鍒涘缓铏氭嫙鐜鎴愬姛鍚庯紝浼氬湪浣犲畨瑁卲y鐨勯偅涓洏锛屽畨瑁呬竴涓櫄鎷熺幆澧冪洰褰曪紝涔嬪悗浣犲皢鎵€鏈夌殑鍖呮斁鍒伴偅涓洰褰曞氨琛屻€?/span>
3銆佸湪鍒癙c閲岄潰瀵煎叆涓嬭櫄鎷熺幆澧冪▼搴?/p>
鍚庨潰灏遍噸鏂板鍏ヤ笅lxml灏卞ソ浜嗐€?/p>
以上是关于UnicodeDecodeError: 'utf-8' codec can't decode byte 闂的主要内容,如果未能解决你的问题,请参考以下文章
python编码问题:UnicodeDecodeError: 'gbk' codec can't decode
python UnicodeDecodeError: 'ascii' codec can't decode byte ...
UnicodeDecodeError: 'ascii' codec can't decode byte错误解决方案
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xcd