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!
相關文章
- 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
- tensorflow讀取圖片時出現錯誤UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 0: invalid sUnicodeError
- 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
- Python——UnicodeEncodeError: 'ascii' codec can't encode/decode charactersPythonUnicodeErrorASCII
- 【python爬蟲】用selenium爬時報錯UnicodeEncodeError: ‘gbk‘ codec can‘t encode character ‘\u2022‘Python爬蟲UnicodeError
- Python讀取csv檔案出現解碼錯誤UnicodeDecodeError: ‘utf-8‘ codec can‘t decodPythonUnicodeError
- day1 UnicodeEncodeError: 'gbk' codec can't encode character '\xa0' in position 2490: illegal multi...UnicodeError
- pip install scrapy報錯:error: UnableError
- pod install 和 rvm install ruby-xxxx報錯解決辦法
- [mac pip錯誤]Can't connect to HTTPS URL because the SSL module is not availableMacHTTPAI
- eslint --fix 報錯 can't not find modulesEsLint
- python cx_Oracle: UnicodeEncodeError: 'ascii' codec can't encode charactersPythonOracleUnicodeErrorASCII
- 報錯xxxx of undefinedUndefined
- Python3解決UnicodeEncodeError: 'ascii' codec can't encode characters in position 0PythonUnicodeErrorASCII
- MYSQL報1022錯誤:Can't write;duplicate key in table '.....'MySql
- windows終端輸入pip install requests報錯:Fatal error in launcherWindowsError
- 升級pip報錯ERROR: Could not install packages due to an OSError: [WinError 5]ErrorPackage
- pip install METIS
- python str與byte轉換 encode decodePython
- 小程式真機報錯errMsg: “hideLoading:fail:toast can‘t be found“ ?IDEAIAST
- Dart: 開源了一個支援 stream 介面的 GBK codec, fast_gbkDartAST
- Mac電腦下使用Socket報錯socket丟擲Can’t assign requested address解決Mac
- pip install uwsgi==2.0.23
- npm install 報錯NPM
- pip install 提示:Could not install packages due to an EnvironmentErrorPackageError
- Django2.2 報錯:UnicodeDecodeError 解決方法DjangoUnicodeError
- 使用npm install安裝webpack報錯ERRNPMWeb
- pip常見報錯
- 不用cmd來pip install selenium,就直接使用Pycharm安裝 install selenium ??PyCharm
- Python:conda install 和pip install的區別Python
- MySQL報錯Table 'plugin' is read only [ERROR] Can't open the mysql.plugin table.MySqlPluginError
- GTID複製報錯處理:Last_Error: Error 'Can't drop database 'test';ASTErrorDatabase