Can't install anything with pip2 on Windows 7 due to UnicodeDecodeError

494 views Asked by At

I'm trying to install Django (with another package the error is the same) for Python 2.7.10/Windows 7 with pip, and getting this strange error

Command is

pip install django

Sorry, but I can't write an entire log because of dumb Windows console. Here is the second part of log.

File "C:\Python27\lib\site-packages\pip\_vendor\requests\packages\urllib3\resp
onse.py", line 307, in stream
data = self.read(amt=amt, decode_content=decode_content)
File "C:\Python27\lib\site-packages\pip\_vendor\requests\packages\urllib3\resp
onse.py", line 243, in read
data = self._fp.read(amt)
File "C:\Python27\lib\site-packages\pip\_vendor\cachecontrol\filewrapper.py",
line 54, in read
self.__callback(self.__buf.getvalue())
File "C:\Python27\lib\site-packages\pip\_vendor\cachecontrol\controller.py", l
ine 244, in cache_response
self.serializer.dumps(request, response, body=body),
File "C:\Python27\lib\site-packages\pip\download.py", line 276, in set
return super(SafeFileCache, self).set(*args, **kwargs)
File "C:\Python27\lib\site-packages\pip\_vendor\cachecontrol\caches\file_cache
.py", line 99, in set
with self.lock_class(name) as lock:
File "C:\Python27\lib\site-packages\pip\_vendor\lockfile\mkdirlockfile.py", li
ne 18, in __init__
LockBase.__init__(self, path, threaded, timeout)
File "C:\Python27\lib\site-packages\pip\_vendor\lockfile\__init__.py", line 18
9, in __init__
hash(self.path)))
File "C:\Python27\lib\ntpath.py", line 85, in join
result_path = result_path + p_path
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc4 in position 0: ordinal not in range(128)

May be it's because of cyrillic username that runs the system. Is there a way to fix it without creating a new user?

Or maybe there is some bad thing that I missed?

0

There are 0 answers