C
C
cehka2018-01-28 23:40:31
Python
cehka, 2018-01-28 23:40:31

Prevents any python package from being installed properly via pip due to utf-8. What to do?

Actually, everything is in the title, I’ll add that my username is Russian, I changed it, but the folder in users still remains the same - it doesn’t allow me to change it through the administrator, writes that somewhere someone is using it at the moment.
Command use pip install pyTelegramBotAPI
Error:

spoiler
ramBotAPI ... error
Exception:
Traceback (most recent call last):
File "c:\users\бог\appdata\local\programs\python\python36-32\lib\site-packages\pip\compat\__init__.py", line 73, in console_to_str
return s.decode(sys.__stdout__.encoding)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe1 in position 50: invalid continuation byte
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\users\бог\appdata\local\programs\python\python36-32\lib\site-packages\pip\basecommand.py", line 215, in main
status = self.run(options, args)
File "c:\users\бог\appdata\local\programs\python\python36-32\lib\site-packages\pip\commands\install.py", line 342, in run
prefix=options.prefix_path,
File "c:\users\бог\appdata\local\programs\python\python36-32\lib\site-packages\pip\req\req_set.py", line 784, in install
**kwargs
File "c:\users\бог\appdata\local\programs\python\python36-32\lib\site-packages\pip\req\req_install.py", line 878, in install
spinner=spinner,
File "c:\users\бог\appdata\local\programs\python\python36-32\lib\site-packages\pip\utils\__init__.py", line 676, in call_subprocess
line = console_to_str(proc.stdout.readline())
File "c:\users\бог\appdata\local\programs\python\python36-32\lib\site-packages\pip\compat\__init__.py", line 75, in console_to_str
return s.decode('utf_8')
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe1 in position 50: invalid continuation byte

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
sim3x, 2018-01-28
@sim3x

Do not use Cyrillic in Windows
Try installing to a directory that does not have Cyrillic in the path

D
Denis, 2018-01-30
@Norkotik

1) Virtualenv can help.
2) create an account with non-Cyrillic characters.
3) Well, or install as system libraries that are available to all users, in C: / python3 (pythonpath)

E
Ernest172, 2019-11-17
@Ernest172

Everything is well described here:
https://answers.microsoft.com/ru-ru/windows/forum/...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question