This project has moved. For the latest updates, please go here.


add virtual env failed, path with UnicodeDecodeError


i`m new to python&PTVS, when i create a new django project, i got this error:

(from pip log)

C:\Python27\lib\site-packages\pip-1.5.4-py2.7.egg\ run on 07/08/14 16:59:43
Downloading from URL
Cannot determine compression type for file c:\users\中文名字\appdata\local\temp\pip-87au6t-unpack\fwlink.obj
Running (path:c:\users\中文名字\appdata\local\temp\pip-oa8y3e-build\ egg_info for package from
running egg_info
creating pip-egg-info\virtualenv.egg-info
writing pip-egg-info\virtualenv.egg-info\PKG-INFO
writing top-level names to pip-egg-info\virtualenv.egg-info\top_level.txt
writing dependency_links to pip-egg-info\virtualenv.egg-info\dependency_links.txt
writing entry points to pip-egg-info\virtualenv.egg-info\entry_points.txt
writing manifest file 'pip-egg-info\virtualenv.egg-info\SOURCES.txt'
warning: manifest_maker: standard file '-c' not found

reading manifest file 'pip-egg-info\virtualenv.egg-info\SOURCES.txt'
reading manifest template ''
warning: no previously-included files matching '*' found under directory 'docs\_templates'
warning: no previously-included files matching '*' found under directory 'docs\_build'
writing manifest file 'pip-egg-info\virtualenv.egg-info\SOURCES.txt'
Cleaning up...
Traceback (most recent call last):
File "C:\Python27\lib\site-packages\pip-1.5.4-py2.7.egg\pip\", line 122, in main
status =, args)
File "C:\Python27\lib\site-packages\pip-1.5.4-py2.7.egg\pip\commands\", line 278, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File "C:\Python27\lib\site-packages\pip-1.5.4-py2.7.egg\pip\", line 1234, in prepare_files
File "C:\Python27\lib\site-packages\pip-1.5.4-py2.7.egg\pip\", line 464, in assert_source_matches_version
% (display_path(self.source_dir), version, self))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xd6 in position 19: ordinal not in range(128)

i believe this is due to my no-ascii characters in the path, but i don`t know how to handle this, can you help me?
thanks in advance.
Closed Jul 14, 2014 at 9:16 PM by Zooba
Limitation of Python 2.x


Zooba wrote Jul 8, 2014 at 12:34 PM

I don't think I put an option in this script to change the download location, so your best bet is probably to install pip yourself. The pip documentation for this is at

If you're still running into the same issue after pip is installed, you can create a config file as described at and set:
build=<a path with only ascii characters>
Also, I'd expect pip to work fine for Python 3; this issue probably only exists for Python 2.

PinoPino wrote Jul 9, 2014 at 2:13 AM

hi Zooba,
i followed your hint, but still got the same error.
i try to install pip individually and it seems like the download zip file will always be put on path like this: 'c:\users\中文字符\appdata\local\temp\tmpdrg4_t\\pip\' :(

so, i user second method. this is my pip.ini file:
build = e:\
and i put it just in the root of e: (e:)
well, at last i still get the same error.

am i misunderstood something?
thank you.

PinoPino wrote Jul 9, 2014 at 2:53 AM

sorry, my apology.
forget about the second method. (it requires the pip was installed successfully)
so, the first method i tried was still give me the error msg. is there any other workaround i can handle this?
thank you

PinoPino wrote Jul 10, 2014 at 7:36 AM

at last i found the solution, a simple one:
just modify the evn variable 'TEMP'&'TMP'
'%USERPROFILE%\AppData\Local\Temp' => 'path without no-ascii characters\AppData\Local\Temp'

that`s all. hope this will help others who encounter the same question :)

Zooba wrote Jul 14, 2014 at 9:15 PM

Glad that was resolved. Python 3.x should work fine, FYI; one of the main changes was intended to prevent issues like this.