0
votes

pip install ktrain while installing ktrian getting below error. please give me any solution.

ERROR: Command errored out with exit status 1: command: 'C:\ProgramData\Anaconda3\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\ADMINI~1\AppData\Local\Temp\2\pip-install-led5_fp5\ktrain\setup.py'"'"'; file='"'"'C:\Users\ADMINI~1\AppData\Local\Temp\2\pip-install-led5_fp5\ktrain\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\ADMINI~1\AppData\Local\Temp\2\pip-install-led5_fp5\ktrain\pip-egg-info' cwd: C:\Users\ADMINI~1\AppData\Local\Temp\2\pip-install-led5_fp5\ktrain
Complete output (7 lines): Traceback (most recent call last): File "", line 1, in File "C:\Users\ADMINI~1\AppData\Local\Temp\2\pip-install-led5_fp5\ktrain\setup.py", line 5, in readme_file.readline() File "C:\ProgramData\Anaconda3\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 0x81 in position 1205: character maps to ---------------------------------------- ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

1
Hi, I think the last line is pointing you in the right direction: ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.. You need to look in the logs. At a glance it looks like it's trying to open an empty file File "", line 1. By the way, I see you are running this from the administrator account, which is probably a bad idea.EntangledLoops

1 Answers

0
votes

I believe the current README file for v0.17.x of ktrain contains Chinese characters. The default Windows encoding of cp1252 has trouble with this. I think this may be resolved in v0.17.3 of ktrain (where setup.py opens the README with utf8 explicitly), if you try installing again.

If it still doesn't work, you can change the encoding on Windows to utf-8 as described here