unable to pip install library in pycharm
Closed this issue · 3 comments
PS C:\Users\Arup\PycharmProjects\LeskAnalysis> pip install bnunicodenormalizer
Collecting bnunicodenormalizer
Downloading bnunicodenormalizer-0.0.3.tar.gz (11 kB)
ERROR: Command errored out with exit status 1:
command: 'C:\Users\Arup\PycharmProjects\LeskAnalysis\venv\Scripts\python.exe' -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\Arup\AppData\Local\Temp\
pip-install-nesbf43v\bnunicodenormalizer_428d03af687444d2962959195be3d2dd\setup.py'"'"'; file='"'"'C:\Users\Arup\AppData\Local\Temp\pip-install-nesbf43v\bnunicodenormalizer_4
28d03af687444d2962959195be3d2dd\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup(
)'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\Arup\AppData\Local\Temp\pip-pip-egg-in
fo-aazd7q5c'
cwd: C:\Users\Arup\AppData\Local\Temp\pip-install-nesbf43v\bnunicodenormalizer_428d03af687444d2962959195be3d2dd
Complete output (7 lines):
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\Arup\AppData\Local\Temp\pip-install-nesbf43v\bnunicodenormalizer_428d03af687444d2962959195be3d2dd\setup.py", line 23, in
long_description=open('README.md').read() + '\n\n' + open('CHANGELOG.txt').read(),
File "C:\Users\Arup\AppData\Local\Programs\Python\Python38\lib\encodings\cp1252.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x8d in position 293: character maps to <undefined>
----------------------------------------
Solution:
Please add encoding'utf-8' while reading the file in Line 23 in setup.py:
long_description=open('README.md',encoding='utf-8').read() + '\n\n' + open('CHANGELOG.txt').read()
Can you please update the repository with the change? It will be really helpful.
Thanks for the suggestion. The repo is updated.
I am still facing the same issue. Please help bhai.
Traceback (most recent call last):
File "setup.py", line 23, in
long_description=open('README.md', encoding='utf-8', errors='ignore').read() + '\n\n' + open('CHANGELOG.txt').read(),
File "C:\Users\arupd\AppData\Local\Programs\Python\Python38\lib\encodings\cp1252.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x8f in position 457: character maps to