Trouble with pip install selenium

2019-09-06 10:26发布

问题:

I have Vista(please avoid comment ;D)... I'm sure of the right install of pip because I have installed other package but when I try to install selenium by pip that's the result.:

C:\Program Files\Python2.7.6>pip install selenium Downloading/unpacking selenium Running setup.py (path:c:\users\gianlu~1\appdata\local\temp\pip_build_Gianluca «\selenium\setup.py) egg_info for package selenium

Cleaning up...

The line below are in red(this is my comment)

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)

End of the red

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)

I'm new of Phyton and that is over for me. The only thing that I can suppose and investigate is that the matter is about the last line "Unicode...".

Thank you for any suggestion.

回答1:

Yes, really a bad question. I was very tired after a code marathon ;D. Starting from my edit of investigate the unicode error and only after a few hours of sleep I find a lot of intresting and working solution. Here the more considerable and useful link:

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)

pip install tabulate UnicodeDecodeError