我有Vista(请避免评论; D)...我确定正确安装了pip因为我已经安装了其他软件包但是当我尝试通过pip安装selenium时就是结果了。:
C:\ Program Files \ Python2.7.6> pip install selenium 下载/解压缩selenium运行setup.py (路径:C:\用户\ gianlu〜1 \应用程序数据\本地\ TEMP \ pip_build_Gianluca «\ selenium \ setup.py)egg_info for package selenium
清理......
Exception:
Traceback (most recent call last):
File "C:\Program Files\Python2.7.6\lib\site-packages\pip\basecommand.py", line
122, in main
status = self.run(options, args)
File "C:\Program Files\Python2.7.6\lib\site-packages\pip\commands\install.py",
line 278, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundl
e=self.bundle)
File "C:\Program Files\Python2.7.6\lib\site-packages\pip\req.py", line 1234, i
n prepare_files
req_to_install.assert_source_matches_version()
File "C:\Program Files\Python2.7.6\lib\site-packages\pip\req.py", line 464, in
assert_source_matches_version
% (display_path(self.source_dir), version, self))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xae in position 65: ordinal
not in range(128)
Traceback (most recent call last):
File "C:\Program Files\Python2.7.6\lib\runpy.py", line 162, in _run_module_as_
main
"__main__", fname, loader, pkg_name)
File "C:\Program Files\Python2.7.6\lib\runpy.py", line 72, in _run_code
exec code in run_globals
File "C:\Program Files\Python2.7.6\pip.exe\__main__.py", line 9, in <module>
File "C:\Program Files\Python2.7.6\lib\site-packages\pip\__init__.py", line 18
5, in main
return command.main(cmd_args)
File "C:\Program Files\Python2.7.6\lib\site-packages\pip\basecommand.py", line
161, in main
text = '\n'.join(complete_log)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xae in position 80: ordinal
not in range(128)
我是Phyton的新手,对我来说已经结束了。我能想到和调查的唯一一件事是关于最后一行“Unicode ......”。
感谢您的任何建议。
答案 0 :(得分:1)
是的,真的是一个糟糕的问题。在代码马拉松之后我很累; D。从我编辑调查unicode错误开始,只有在几个小时的睡眠后,我才发现很多有趣和有效的解决方案。这里有更多可观和有用的链接:
Python ez_install : UnicodeDecodeError: 'ascii' codec can't decode byte 0xae in position 11
UnicodeDecodeError : 'ascii' codec can't decode byte 0xe0 in position 0: ordinal not in range(128)