安装时出现Pip错误 [英] Pip Error when installing
问题描述
每当我尝试在get-pip.py脚本中安装pip us时,都会出现错误. 将cmd设为Admin,已经重新安装了python.
Whenever I try to install pip usin the get-pip.py script, it just gives me errors. Ran cmd as Admin, re-installed python already..
我正在使用python 2.7.9
I'm using python 2.7.9
Exception:
Traceback (most recent call last):
File "c:\users\alex temporõr\appdata\local\temp\tmp13p7cp\pip.zip\pip\basecommand.py", line 232, in main
status = self.run(options, args)
File "c:\users\alex temporõr\appdata\local\temp\tmp13p7cp\pip.zip\pip\commands\install.py", line 339, in run
requirement_set.prepare_files(finder)
File "c:\users\alex temporõr\appdata\local\temp\tmp13p7cp\pip.zip\pip\req\req_set.py", line 355, in prepare_files
do_download, session=self.session,
File "c:\users\alex temporõr\appdata\local\temp\tmp13p7cp\pip.zip\pip\download.py", line 782, in unpack_url
session,
File "c:\users\alex temporõr\appdata\local\temp\tmp13p7cp\pip.zip\pip\download.py", line 667, in unpack_http_url
from_path, content_type = _download_http_url(link, session, temp_dir)
File "c:\users\alex temporõr\appdata\local\temp\tmp13p7cp\pip.zip\pip\download.py", line 841, in _download_http_url
file_path = os.path.join(temp_dir, filename)
File "C:\Python27\lib\ntpath.py", line 84, in join
result_path = result_path + p_path
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe4 in position 18: ordinal not in range(128)</code>
好吧,这确实是由于名称中的ä",更改了用户并且安装得很好,这要感谢 Padraic Cunningham 指出了这一点.
Ok, It was indeed because of the "ä" in the name, changed the user and it installed fine, thanks to Padraic Cunningham for pointing it out.
推荐答案
仅出于完整性考虑,在本例中为问题,如非ASCII字符,则会发生类似的错误.因此,对于您可怜的灵魂找到这个问题,请当心:-)
Just for the sake of completeness, in this case the problem, as pointed out by Padraic, the problem was the non-ASCII character in your username. A similar error would have occurred if you had had non-ASCII characters in your computer name. So, for you poor souls finding this, be ware of that :-)
这篇关于安装时出现Pip错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!