Python3.7使用pip install xxxx報錯:UnicodeDecodeError: 'gbk' codec can't decode byte
今天需要使用python開發Storm,需要使用命令pip安裝pyleus,但出現了錯誤,能力有限解決了好久。。。。。。
錯誤如下:
C:\Users\sxgjhsdn>pip install pyleus
Collecting pyleus
Using cached https://files.pythonhosted.org/packages/39/27/516fb9ee0ebb3e607620275d44af6ebf79fab3482b09c8605530a98819c8/pyleus-0.3.0.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\sxgjhsdn\AppData\Local\Temp\pip-install-0r5oj6na\pyleus\setup.py", line 81, in <module>
long_description=readme(),
File "C:\Users\sxgjhsdn\AppData\Local\Temp\pip-install-0r5oj6na\pyleus\setup.py", line 65, in readme
return f.read()
UnicodeDecodeError: 'gbk' codec can't decode byte 0x99 in position 820: illegal multibyte sequence
這個時候我的pip版本是最新的。
蓋因是win10編碼的問題!
話不多說,解決方法如下:
使用命令:pip download pyleus下載好需要的tar包,進入tar包:
編輯(報錯行是65):
def readme():
#在open的引數中加入mode='r'和encoding='UTF-8'引數
with open("README.rst", mode='r',encoding='UTF-8') as f:
#報錯行
return f.read()
在cmd中執行:pip install pyleus-0.3.0.tar.gz 。
Success!
相關文章
- pip install 報錯UnicodeDecodeError: 'ascii' codec can't decode byteUnicodeErrorASCII
- Python報錯:UnicodeDecodeError: 'gbk' codec can't decode byte ...PythonUnicodeError
- pip install ... ERROR: UnicodeDecodeError: ‘gbk‘ codec can‘t decode/ python setup.py egg_info CheckErrorUnicodePython
- pipenv install error UnicodeDecodeError: 'utf8' codec can't decode byte 0xb4 in positionErrorUnicode
- PIP3安裝報錯nicodeDecodeError: 'ascii' codec can't decode byte 0xc3ErrorASCII
- UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc8 in position 0: invalid continuation byteUnicodeError
- Python讀取檔案時出現UnicodeDecodeError: 'gbk' codec can't decode byte 0x80 in position xx: 解決方案PythonUnicodeError
- json.dumps錯誤:'utf8' codec can't decode byte解決方案JSON
- python在用pandas對csv檔案處理的時候報UnicodeDecodeError: ‘utf-8‘ codec can‘t decode byte 0xb6。。。的錯誤PythonUnicodeError
- PyMySQL 獲取資料 'utf-8' codec can't decode byte 0xed in position 2: 錯誤MySql
- tensorflow讀取圖片時出現錯誤UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 0: invalid sUnicodeError
- Python——UnicodeEncodeError: 'ascii' codec can't encode/decode charactersPythonUnicodeErrorASCII
- python報錯問題解決:'ascii' codec can't encode characterPythonASCII
- Python讀取csv檔案出現解碼錯誤UnicodeDecodeError: ‘utf-8‘ codec can‘t decodPythonUnicodeError
- pip install scrapy報錯:error: UnableError
- 異常: 'ascii' codec can't encode charactersASCII
- 【python爬蟲】用selenium爬時報錯UnicodeEncodeError: ‘gbk‘ codec can‘t encode character ‘\u2022‘Python爬蟲UnicodeError
- day1 UnicodeEncodeError: 'gbk' codec can't encode character '\xa0' in position 2490: illegal multi...UnicodeError
- eslint --fix 報錯 can't not find modulesEsLint
- MongoDB報錯:"assertion" : "can't map file memory"MongoDB
- Can't use function return value in write context 使用empty遇到報錯FunctionContext
- [mac pip錯誤]Can't connect to HTTPS URL because the SSL module is not availableMacHTTPAI
- Mysql報錯Fatal error:Can't open and lock privilege tablesMySqlError
- 【crontab】“bad minute”及“errors in crontab file, can't install”錯誤處理Error
- errors in crontab file, can't install. - linux crontabErrorLinux
- windows終端輸入pip install requests報錯:Fatal error in launcherWindowsError
- pod install 和 rvm install ruby-xxxx報錯解決辦法
- python cx_Oracle: UnicodeEncodeError: 'ascii' codec can't encode charactersPythonOracleUnicodeErrorASCII
- MySQL 建立外來鍵報錯Can't write; duplicate key in tableMySql
- MySQL 5.5 原始碼安裝報錯"[ERROR] Can't start server"MySql原始碼ErrorServer
- 升級pip報錯ERROR: Could not install packages due to an OSError: [WinError 5]ErrorPackage
- MYSQL報1022錯誤:Can't write;duplicate key in table '.....'MySql
- pip常見報錯
- pip install METIS
- mysql匯入報錯Variable 'sql_notes' can't be set to the value of 'NULL'MySqlNull
- RMAN的"rman: can't open target"錯誤
- (轉)pip和easy_install使用方式
- Python3解決UnicodeEncodeError: 'ascii' codec can't encode characters in position 0PythonUnicodeErrorASCII