2017-07-27 67 views
0

蟒蛇:3.6.2Python3.6.2安裝包的原因錯誤

創建虛擬環境:

python -m venv venv 

安裝包:

pip install flask 

原因的異常:

Exception: 
Traceback (most recent call last): 
    File "d:\python36-32\lib\site-packages\pip\basecommand.py", line 215, in main 
    status = self.run(options, args) 
    File "d:\python36-32\lib\site-packages\pip\commands\install.py", line 342, in run 
    prefix=options.prefix_path, 
    File "d:\python36-32\lib\site-packages\pip\req\req_set.py", line 784, in install 
    **kwargs 
    File "d:\python36-32\lib\site-packages\pip\req\req_install.py", line 851, in install 
    self.move_wheel_files(self.source_dir, root=root, prefix=prefix) 
    File "d:\python36-32\lib\site-packages\pip\req\req_install.py", line 1064, in move_wheel_files 
    isolated=self.isolated, 
    File "d:\python36-32\lib\site-packages\pip\wheel.py", line 247, in move_wheel_files 
    prefix=prefix, 
    File "d:\python36-32\lib\site-packages\pip\locations.py", line 141, in distutils_scheme 
    d.parse_config_files() 
    File "d:\python36-32\lib\distutils\dist.py", line 395, in parse_config_files 
    parser.read(filename) 
    File "d:\python36-32\lib\configparser.py", line 697, in read 
    self._read(fp, filename) 
    File "d:\python36-32\lib\configparser.py", line 1015, in _read 
    for lineno, line in enumerate(fp, start=1): 
UnicodeDecodeError: 'gbk' codec can't decode byte 0x9d in position 0: incomplete multibyte sequence 

如何解決它?

+0

sys.getdefaultencoding()說什麼? – saul

+0

@saul it's utf8 –

+0

我以前見過有人在他工作的路徑中有一個較老的'pip'版本和國際字符。 –

回答

0

我只是在我的項目中刪除一個文件,點子再次正常工作。很奇怪!

該文件是setup.cfg。根據燒瓶tutorial

[egg_info] tag_build = .dev tag_date = 1 

[aliases] release = egg_info -RDb 」 
+0

我在Flask的GitHub上打開了https://github.com/pallets/flask/issues/2429。 –

+0

@ŁukaszRogalski謝謝! –