2017-08-12 111 views
0

我一直在爲我的python安裝matplotlib工具包時遇到問題。 命令pip install basemap-1.1.0-cp36-cp36m-win32.whl 我的Windows命令promt,安裝開始不久,並運行一段時間,但之後,它停下來,只是給了我以下消息:UnicodeDecodeError:'utf-8'編解碼器無法解碼位置33中的字節0xe4:無效延續字節

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

爲什麼'你只要做'pip install matplotlib' ??基本上這會安裝任何依賴項。 –

+0

解決了,謝謝!我認爲整個.whl包是matplotlib,因此這就是我下載matplotlib時得到的結果。不知道你可以只安裝它的某些部分。 –

+0

我在答案中添加了相同的內容。如果它有幫助,請考慮打勾標記或upvote。謝謝 –

回答

0

pip install matplotlib

您正在安裝matplotlib的依賴特定版本。但上述命令將自動安裝受支持版本的任何依賴項。這將是特定於您的Python版本。

相關問題