我在为python安装matplotlib工具包时遇到了问题。 给出命令 pip install basemap-1.1.0-cp36-cp36m-win32.whl 到我的Windows命令promt,安装很快开始并运行一段时间,但在那之后,它停止并给我以下消息:
Exception:
Traceback (most recent call last):
File "c:\users\lasse\appdata\local\programs\python\python36-32\lib\site-packages\pip\compat\__init__.py", line 73, in console_to_str
return s.decode(sys.__stdout__.encoding)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe4 in position 33: invalid continuation byte
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\users\lasse\appdata\local\programs\python\python36-32\lib\site-packages\pip\basecommand.py", line 215, in main
status = self.run(options, args)
File "c:\users\lasse\appdata\local\programs\python\python36-32\lib\site-packages\pip\commands\install.py", line 324, in run
requirement_set.prepare_files(finder)
File "c:\users\lasse\appdata\local\programs\python\python36-32\lib\site-packages\pip\req\req_set.py", line 380, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File "c:\users\lasse\appdata\local\programs\python\python36-32\lib\site-packages\pip\req\req_set.py", line 634, in _prepare_file
abstract_dist.prep_for_dist()
File "c:\users\lasse\appdata\local\programs\python\python36-32\lib\site-packages\pip\req\req_set.py", line 129, in prep_for_dist
self.req_to_install.run_egg_info()
File "c:\users\lasse\appdata\local\programs\python\python36-32\lib\site-packages\pip\req\req_install.py", line 439, in run_egg_info
command_desc='python setup.py egg_info')
File "c:\users\lasse\appdata\local\programs\python\python36-32\lib\site-packages\pip\utils\__init__.py", line 676, in call_subprocess
line = console_to_str(proc.stdout.readline())
File "c:\users\lasse\appdata\local\programs\python\python36-32\lib\site-packages\pip\compat\__init__.py", line 75, in console_to_str
return s.decode('utf_8')
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe4 in position 33: invalid continuation byte.
我试图寻找答案,但我找到的所有东西都与安装无关,但是代码是由用户自己编写的,所以我不知道如何将这些信息应用到我的案例中。
答案 0 :(得分:0)
执行pip install matplotlib
您正在安装matplotlib的特定版本的依赖项。但是上面的命令会自动安装受支持版本的任何依赖项。哪个将特定于您的python版本。